We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8054419 commit d9f9ee5Copy full SHA for d9f9ee5
lib/log.sh
@@ -8,7 +8,7 @@
8
# ==============================================================================
9
10
# Unless $LOG_FD is already set to a valid fd
11
-if ! [[ "$LOG_FD" =~ ^[0-9]+$ ]] || ! { true >&"$LOG_FD" ; } 2>/dev/null ; then
+if ! [[ "${LOG_FD-}" =~ ^[0-9]+$ ]] || ! { : >&"${LOG_FD-2}"; } 2>/dev/null; then
12
# Preserve the original STDOUT on a free fd (stored in $LOG_FD) so that we can
13
# log to it without interfering with the STDOUT of subshells whose output we
14
# want to capture for other purposes.
0 commit comments