From 377c83bcf1518feba9656d464cfba8dadd07c769 Mon Sep 17 00:00:00 2001 From: reachableceo Date: Mon, 27 Jul 2026 09:32:04 -0500 Subject: [PATCH] fix(framework): guard tput calls against missing TERM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The framework sources ErrorHandling.sh which enables `set -o errexit` globally, yet PrettyPrint's print_info/print_error invoked `tput bold` and `tput sgr0` with no protection. In any TERM-less context (SSH automation, CI, cron) `tput` fails with "unknown terminal" and, under errexit, aborts the entire script on the very first status message. Suppress tput stderr and add `|| true` so the color helpers degrade gracefully to plain output instead of crashing every consumer script. This is an internal framework consistency fix: strict mode + unguarded external command were mutually incompatible. 🤖 Generated with [Crush](https://github.com/charmassociates/crush) Assisted-by: GLM-5 via Crush --- .../KNELShellFramework/Framework-Includes/PrettyPrint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/git@git.knownelement.com/29418/KNEL/KNELShellFramework/Framework-Includes/PrettyPrint.sh b/vendor/git@git.knownelement.com/29418/KNEL/KNELShellFramework/Framework-Includes/PrettyPrint.sh index 8bd801c..0c1447a 100644 --- a/vendor/git@git.knownelement.com/29418/KNEL/KNELShellFramework/Framework-Includes/PrettyPrint.sh +++ b/vendor/git@git.knownelement.com/29418/KNEL/KNELShellFramework/Framework-Includes/PrettyPrint.sh @@ -2,18 +2,18 @@ function print_info() { GREEN='\033[0;32m' NC='\033[0m' - tput bold + tput bold 2>/dev/null || true echo -e "$GREEN $1${NC}" echo -e "$GREEN $1${NC}" >> "$LOGFILENAME" - tput sgr0 + tput sgr0 2>/dev/null || true } function print_error() { RED='\033[0;31m' NC='\033[0m' - tput bold + tput bold 2>/dev/null || true echo -e "$RED $1${NC}" echo -e "$RED $1${NC}" >> "$LOGFILENAME" - tput sgr0 + tput sgr0 2>/dev/null || true } \ No newline at end of file