mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Fix unset variables in shell2junit
This commit is contained in:
parent
5fe4d279ca
commit
33a0b5af0c
4
third_party/forked/shell2junit/sh2ju.sh
vendored
4
third_party/forked/shell2junit/sh2ju.sh
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user