core: load app defaults before applying base_settings / fix composer cleanup after install/update (#9965)
* fix(build): load app defaults before applying base_settings App defaults were loaded after base_settings, causing saved values to be ignored. Now loads var_* from app defaults file before calling base_settings. * 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. * 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:
parent
9a6a0379a6
commit
35793051a1
@ -2148,8 +2148,8 @@ install_script() {
|
||||
header_info
|
||||
echo -e "${DEFAULT}${BOLD}${BL}Using App Defaults for ${APP} on node $PVEHOST_NAME${CL}"
|
||||
METHOD="appdefaults"
|
||||
base_settings
|
||||
load_vars_file "$(get_app_defaults_path)"
|
||||
base_settings
|
||||
echo_default
|
||||
defaults_target="$(get_app_defaults_path)"
|
||||
break
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user