Fix missing error message for invalid step doing a selection of steps
This commit is contained in:
@@ -485,7 +485,7 @@ execute() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# don't execute step functions which are not available
|
# don't execute step functions which are not available
|
||||||
if [ $NOTFOUND -eq 1 ] ; then
|
if [ $NOTFOUND -ne 0 ] ; then
|
||||||
return $NOTFOUND
|
return $NOTFOUND
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -540,7 +540,6 @@ checkStep() {
|
|||||||
eval 'ref=$alias_'"$1"
|
eval 'ref=$alias_'"$1"
|
||||||
# Catch special character after eval
|
# Catch special character after eval
|
||||||
if ! [[ "$ref" =~ $rex ]] ; then
|
if ! [[ "$ref" =~ $rex ]] ; then
|
||||||
echoerr " [E] Invalid step: $1"
|
|
||||||
ref=0
|
ref=0
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -548,6 +547,7 @@ checkStep() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if (( $ref < 1 || $ref > $MAX_STEP )) ; then
|
if (( $ref < 1 || $ref > $MAX_STEP )) ; then
|
||||||
|
echoerr " [E] Invalid step: $ref"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
existsFunction step_$ref
|
existsFunction step_$ref
|
||||||
@@ -555,6 +555,7 @@ checkStep() {
|
|||||||
return $ref
|
return $ref
|
||||||
else
|
else
|
||||||
# step doesn't exist
|
# step doesn't exist
|
||||||
|
echoerr " [E] Invalid step: $ref"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -593,7 +594,7 @@ continous() {
|
|||||||
execute -q $i
|
execute -q $i
|
||||||
local res=$?
|
local res=$?
|
||||||
if [ $res -ne 0 ] ; then
|
if [ $res -ne 0 ] ; then
|
||||||
break;
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@@ -616,7 +617,7 @@ selection() {
|
|||||||
step=$?
|
step=$?
|
||||||
# stop on step 0
|
# stop on step 0
|
||||||
if [ $step -eq 0 ] ; then
|
if [ $step -eq 0 ] ; then
|
||||||
break
|
return 1
|
||||||
else
|
else
|
||||||
execute $step
|
execute $step
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user