From 49c111a8675a266f9ce59b36720b36ca63c12025 Mon Sep 17 00:00:00 2001 From: Ben Ashton Date: Thu, 29 Sep 2022 23:35:02 -0600 Subject: [PATCH] Fixed use of incorrect variable --- src/exprash.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/exprash.sh b/src/exprash.sh index 268287d..de9a616 100644 --- a/src/exprash.sh +++ b/src/exprash.sh @@ -1,9 +1,9 @@ #!/bin/bash # shellcheck disable=SC2034 # false flags nameref params -# ===================== -# Require shell options -# ===================== +# ====================== +# Required shell options +# ====================== # Necessary for piping to "send" funciton shopt -s lastpipe @@ -12,13 +12,13 @@ shopt -s lastpipe # Setup Functions # =============== -# $1: Log file to redirect output +# $1: Log file for redirecting stdout to function redirectStdout() { local output="$1"; [ -z "$output" ] && output="/dev/null"; exec 5<&1; - _exprashRedirectStdout="$1"; + _exprashRedirectStdout="$output"; exec 1>>"$_exprashRedirectStdout"; printf '%s: %s\n' "${REQUEST_METHOD:-UNKNOWN}" "${PATH_INFO:-/}" }