mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-05 18:13:50 +00:00
fix(koillection): ensure newline before appending to .env.local (#13440)
If .env.local does not end with a newline, the APP_RUNTIME entry gets concatenated with the previous line, causing Symfony to fail with an invalid trusted header error during composer install. Closes #13438
This commit is contained in:
committed by
GitHub
parent
7511415b89
commit
c53ce61472
@@ -48,7 +48,9 @@ function update_script() {
|
|||||||
|
|
||||||
# Ensure APP_RUNTIME is in .env.local for CLI commands (upgrades from older versions)
|
# Ensure APP_RUNTIME is in .env.local for CLI commands (upgrades from older versions)
|
||||||
if ! grep -q "APP_RUNTIME" /opt/koillection/.env.local 2>/dev/null; then
|
if ! grep -q "APP_RUNTIME" /opt/koillection/.env.local 2>/dev/null; then
|
||||||
echo 'APP_RUNTIME="Symfony\Component\Runtime\SymfonyRuntime"' >> /opt/koillection/.env.local
|
# Ensure file ends with newline before appending to avoid concatenation
|
||||||
|
[[ -s /opt/koillection/.env.local && -n "$(tail -c 1 /opt/koillection/.env.local)" ]] && echo "" >>/opt/koillection/.env.local
|
||||||
|
echo 'APP_RUNTIME="Symfony\Component\Runtime\SymfonyRuntime"' >>/opt/koillection/.env.local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export COMPOSER_ALLOW_SUPERUSER=1
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
|
|||||||
Reference in New Issue
Block a user