mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-03 18:35:55 +00:00
fix(core): keep host-side logging on BUILD_LOG after INSTALL_LOG export
After 'export INSTALL_LOG' in build.func, get_active_logfile() returned the container's INSTALL_LOG path for all host-side logging, causing msg_info/msg_ok/msg_error on the host to write to /root/.install-SESSION.log (the host file, not the container's) instead of BUILD_LOG. This made BUILD_LOG incomplete and get_full_log() unable to send full traces. Fix: Add _HOST_LOGFILE (not exported, invisible to container) so the host always logs to BUILD_LOG. Container still uses INSTALL_LOG as before.
This commit is contained in:
@@ -3578,6 +3578,13 @@ build_container() {
|
||||
# DEV_MODE exports (optional, for debugging)
|
||||
export BUILD_LOG="$BUILD_LOG"
|
||||
export INSTALL_LOG="/root/.install-${SESSION_ID}.log"
|
||||
|
||||
# Keep host-side logging on BUILD_LOG (not exported — invisible to container)
|
||||
# Without this, get_active_logfile() would return INSTALL_LOG (a container path)
|
||||
# and all host msg_info/msg_ok/msg_error would write to /root/.install-SESSION.log
|
||||
# on the HOST instead of BUILD_LOG, causing incomplete telemetry logs.
|
||||
_HOST_LOGFILE="$BUILD_LOG"
|
||||
|
||||
export dev_mode="${dev_mode:-}"
|
||||
export DEV_MODE_MOTD="${DEV_MODE_MOTD:-false}"
|
||||
export DEV_MODE_KEEP="${DEV_MODE_KEEP:-false}"
|
||||
|
||||
Reference in New Issue
Block a user