Skip to content

Commit a4515ad

Browse files
committed
Use /mnt/data/tmp for temporary build files if it exists #11323
1 parent f403c19 commit a4515ad

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

bin/build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@ if id "$DEPLOY_USER" >/dev/null 2>&1; then
3333
exit
3434
fi
3535

36+
# Use /mnt/data/tmp if it exists
37+
TMP_DIR="/mnt/data/tmp"
38+
if [ ! -d "$TMP_DIR" ]; then
39+
TMP_DIR="/tmp"
40+
fi
41+
3642
# Declare a fake HOME, so that cache and various config files can be created
37-
export HOME="/tmp/$DEPLOY_USER"
43+
export HOME="$TMP_DIR/home-$DEPLOY_USER"
3844
fi
3945

4046
# Try to use PHP 8.2, or fallback to default version

0 commit comments

Comments
 (0)