mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-13 12:15:03 +00:00
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:
+1
-1
@@ -2148,8 +2148,8 @@ install_script() {
|
|||||||
header_info
|
header_info
|
||||||
echo -e "${DEFAULT}${BOLD}${BL}Using App Defaults for ${APP} on node $PVEHOST_NAME${CL}"
|
echo -e "${DEFAULT}${BOLD}${BL}Using App Defaults for ${APP} on node $PVEHOST_NAME${CL}"
|
||||||
METHOD="appdefaults"
|
METHOD="appdefaults"
|
||||||
base_settings
|
|
||||||
load_vars_file "$(get_app_defaults_path)"
|
load_vars_file "$(get_app_defaults_path)"
|
||||||
|
base_settings
|
||||||
echo_default
|
echo_default
|
||||||
defaults_target="$(get_app_defaults_path)"
|
defaults_target="$(get_app_defaults_path)"
|
||||||
break
|
break
|
||||||
|
|||||||
+1
-1
@@ -828,7 +828,7 @@ cleanup_lxc() {
|
|||||||
# Ruby gem
|
# Ruby gem
|
||||||
if command -v gem &>/dev/null; then $STD gem cleanup || true; fi
|
if command -v gem &>/dev/null; then $STD gem cleanup || true; fi
|
||||||
# Composer (PHP)
|
# 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
|
if command -v journalctl &>/dev/null; then
|
||||||
$STD journalctl --vacuum-time=10m || true
|
$STD journalctl --vacuum-time=10m || true
|
||||||
|
|||||||
Reference in New Issue
Block a user