From 35793051a1646dc36d5b8b48739de669a684c31b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 15 Dec 2025 09:37:01 +0100 Subject: [PATCH] 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. --- misc/build.func | 2 +- misc/core.func | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 48626d9b0..ee747277d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -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 diff --git a/misc/core.func b/misc/core.func index 9d3ac79df..04224cd8b 100644 --- a/misc/core.func +++ b/misc/core.func @@ -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