1
0
forked from Proxmox/ProxmoxVE

fix(cleanup): suppress composer root warning in cleanup_lxc

Composer's clear-cache command prompts for confirmation when run as root,
causing scripts to hang at 'Cleaning up' stage. Set COMPOSER_ALLOW_SUPERUSER=1
to suppress the interactive prompt.

Fixes #9952 (Heimdall Dashboard), also affects BentoPDF and other PHP apps.
This commit is contained in:
CanbiZ
2025-12-15 08:51:24 +01:00
parent 557400470c
commit 79113b3d17

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 $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