I safe directory inside

This commit is contained in:
Fabian @ Blax Software 2026-04-23 11:04:47 +02:00
parent 6e1f43fcbc
commit 4e9d7a629c
1 changed files with 9 additions and 0 deletions

View File

@ -20,6 +20,15 @@ echo "[1/5] Preparing writable dirs..."
mkdir -p /.composer && chmod 0777 /.composer 2>/dev/null || true mkdir -p /.composer && chmod 0777 /.composer 2>/dev/null || true
if command -v git >/dev/null 2>&1; then
if git config --system --get-all safe.directory 2>/dev/null | grep -Fxq "/var/www/html"; then
echo " git safe.directory already includes /var/www/html"
else
git config --system --add safe.directory /var/www/html 2>/dev/null || true
echo " Added git safe.directory: /var/www/html"
fi
fi
if [ "${ENABLE_LARAVEL_PERMS:-0}" = "1" ]; then if [ "${ENABLE_LARAVEL_PERMS:-0}" = "1" ]; then
echo " ENABLE_LARAVEL_PERMS=1 — applying targeted writable-dir fixes" echo " ENABLE_LARAVEL_PERMS=1 — applying targeted writable-dir fixes"
for p in /var/www/html/storage /var/www/html/bootstrap/cache; do for p in /var/www/html/storage /var/www/html/bootstrap/cache; do