File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -31,4 +31,4 @@ colored = "3.0.0"
31
31
nix = { version = " 0.29.0" , features = [" user" ] }
32
32
users = " 0.11"
33
33
uuid = { version = " 1.4" , features = [" v4" , " serde" ] }
34
- tower-http = { version = " 0.4 " , features = [" fs" ] }
34
+ tower-http = { version = " 0.6.2 " , features = [" fs" ] }
Original file line number Diff line number Diff line change @@ -394,13 +394,17 @@ else
394
394
FRONTEND_REBUILD_NEEDED=1
395
395
fi
396
396
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
400
398
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
402
401
echo -e " ${GREEN} Frontend files already exist in backend static directory.${NC} "
403
402
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
404
408
fi
405
409
406
410
# Build the frontend if needed or if backend was updated or if frontend files don't exist
You can’t perform that action at this time.
0 commit comments