1
0
forked from Proxmox/ProxmoxVE

Fix COMPOSER_ALLOW_SUPERUSER export in cleanup_lxc

Exports COMPOSER_ALLOW_SUPERUSER before running composer clear-cache to ensure the environment variable is set correctly during cleanup.
This commit is contained in:
CanbiZ
2025-12-15 08:53:53 +01:00
parent 79113b3d17
commit 1ef2fb21f0

View File

@ -828,7 +828,7 @@ cleanup_lxc() {
# Ruby gem
if command -v gem &>/dev/null; then $STD gem cleanup || true; fi
# Composer (PHP)
if command -v composer &>/dev/null; then COMPOSER_ALLOW_SUPERUSER=1 $STD composer clear-cache || true; fi
if command -v composer &>/dev/null; then COMPOSER_ALLOW_SUPERUSER=1 && $STD composer clear-cache || true; fi
if command -v journalctl &>/dev/null; then
$STD journalctl --vacuum-time=10m || true