Skip to content

Commit 0b1cf84

Browse files
committed
Updated frontend file check in installer & bump dependency version
1 parent a4a7012 commit 0b1cf84

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ colored = "3.0.0"
3131
nix = { version = "0.29.0", features = ["user"] }
3232
users = "0.11"
3333
uuid = { version = "1.4", features = ["v4", "serde"] }
34-
tower-http = { version = "0.4", features = ["fs"] }
34+
tower-http = { version = "0.6.2", features = ["fs"] }

scripts/install.sh

+8-4
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,17 @@ else
394394
FRONTEND_REBUILD_NEEDED=1
395395
fi
396396

397-
# After checking for frontend updates, add this check for existing compiled frontend
398-
399-
# Check if frontend has already been compiled and copied
397+
# Check if frontend has already been compiled and copied - with improved detection for deleted files
400398
FRONTEND_FILES_EXIST=0
401-
if [ -d "$REPO_DIR/static/_next" ]; then
399+
if [ -d "$REPO_DIR/static" ] && [ -d "$REPO_DIR/static/_next" ] && [ "$(ls -A "$REPO_DIR/static" 2>/dev/null)" ]; then
400+
# Check if the static directory has actual content and wasn't emptied by an update
402401
echo -e "${GREEN}Frontend files already exist in backend static directory.${NC}"
403402
FRONTEND_FILES_EXIST=1
403+
else
404+
# Static directory doesn't exist, is empty, or doesn't have the Next.js build files
405+
echo -e "${YELLOW}Frontend files missing or incomplete in backend static directory.${NC}"
406+
# Force rebuild of frontend
407+
FRONTEND_REBUILD_NEEDED=1
404408
fi
405409

406410
# Build the frontend if needed or if backend was updated or if frontend files don't exist

0 commit comments

Comments
 (0)