From 33a0b5af0c12ffddef20e54fe96298ebdd747ff2 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Thu, 25 Jan 2018 13:30:27 -0800 Subject: [PATCH] Fix unset variables in shell2junit --- third_party/forked/shell2junit/sh2ju.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/forked/shell2junit/sh2ju.sh b/third_party/forked/shell2junit/sh2ju.sh index eda88c2bf02..a6ed4da93bd 100755 --- a/third_party/forked/shell2junit/sh2ju.sh +++ b/third_party/forked/shell2junit/sh2ju.sh @@ -92,7 +92,7 @@ function juLog() { # calculate command to eval [ -z "$1" ] && return cmd="$1"; shift - while [ -n "$1" ] + while [ -n "${1:-}" ] do cmd="$cmd \"$1\"" shift @@ -118,7 +118,7 @@ function juLog() { # set the appropriate error, based in the exit code and the regex [ $evErr != 0 ] && err=1 || err=0 out=`cat $outf | ${SED} -e 's/^\([^+]\)/| \1/g'` - if [ $err = 0 -a -n "$ereg" ]; then + if [ $err = 0 -a -n "${ereg:-}" ]; then H=`echo "$out" | egrep $icase "$ereg"` [ -n "$H" ] && err=1 fi