From 48161367cd7b9a0ea25b2e43acbc8b8d99ad0504 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 26 Sep 2025 17:09:09 +0200 Subject: [PATCH] Fix unbound variable in log initialization --- lib/log.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/log.sh b/lib/log.sh index 0b801f7..5f94701 100644 --- a/lib/log.sh +++ b/lib/log.sh @@ -8,7 +8,7 @@ # ============================================================================== # Unless $LOG_FD is already set to a valid fd -if ! [[ "$LOG_FD" =~ ^[0-9]+$ ]] || ! { true >&"$LOG_FD" ; } 2>/dev/null ; then +if ! [[ "${LOG_FD-}" =~ ^[0-9]+$ ]] || ! { : >&"${LOG_FD-2}"; } 2>/dev/null; then # Preserve the original STDOUT on a free fd (stored in $LOG_FD) so that we can # log to it without interfering with the STDOUT of subshells whose output we # want to capture for other purposes.