From 624ac450e356e2defb81ae171fce0fc35f9b87c9 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Mon, 31 Jul 2023 00:48:09 +0200 Subject: [PATCH] trap-logging: just discard logs dir when ANSI_COLOR=none --- lib/functions/logging/trap-logging.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/functions/logging/trap-logging.sh b/lib/functions/logging/trap-logging.sh index f8ac705cd4..7b26b3003d 100644 --- a/lib/functions/logging/trap-logging.sh +++ b/lib/functions/logging/trap-logging.sh @@ -18,9 +18,9 @@ function trap_handler_cleanup_logging() { # `pwd` might not even be valid anymore. Move back to ${SRC} cd "${SRC}" || exit_with_error "cray-cray about SRC: ${SRC}" - # Just delete LOGDIR if in CONFIG_DEFS_ONLY mode. - if [[ "${CONFIG_DEFS_ONLY}" == "yes" ]]; then - display_alert "Discarding logs" "CONFIG_DEFS_ONLY=${CONFIG_DEFS_ONLY}" "debug" + # Just delete LOGDIR if in CONFIG_DEFS_ONLY mode, or if ANSI_COLOR is "none". + if [[ "${CONFIG_DEFS_ONLY}" == "yes" || "${ANSI_COLOR}" == "none" ]]; then + display_alert "Discarding logs" "CONFIG_DEFS_ONLY=${CONFIG_DEFS_ONLY};ANSI_COLOR=${ANSI_COLOR}" "debug" discard_logs_tmp_dir return 0 fi