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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user