Skip to content

Commit

Permalink
Update rear
Browse files Browse the repository at this point in the history
In sbin/rear quoting is mandatory in test -d "$TMP_DIR"
otherwise 'test -d' falsely succeeds if $TMP_DIR is empty, cf.
rear#2966 (comment)
  • Loading branch information
jsmeix committed Apr 6, 2023
1 parent 65f0ad5 commit 9911066
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion usr/sbin/rear
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,9 @@ if test "$DEBUG" ; then
# because both stdout and stderr use one same file descriptor:
exec 1>&2
else
if test -d $TMP_DIR ; then
# Quoting is mandatory otherwise 'test -d' falsely succeeds if $TMP_DIR is empty, cf.
# https://github.com/rear/rear/issues/2966#issuecomment-1497825493
if test -d "$TMP_DIR" ; then
STDOUT_STDERR_FILE="$TMP_DIR/$PROGRAM.$WORKFLOW.stdout_stderr"
# The stdout and stderr file that is used during runtime must not be changed:
readonly STDOUT_STDERR_FILE
Expand Down

0 comments on commit 9911066

Please sign in to comment.