Commit 66c9e82c authored by Vincent Pelletier's avatar Vincent Pelletier

shell/caucase.sh: Remove return value when it is "$?".

Is no value is provided to a return statement, the status of the last
command ran is returned, making "$?" superfluous.
parent 668a2757
...@@ -59,7 +59,7 @@ forEachJSONListItem () { ...@@ -59,7 +59,7 @@ forEachJSONListItem () {
local list index local list index
list="$(cat)" list="$(cat)"
for index in $(seq 0 $(($(printf '%s\n' "$list" | jq length) - 1))); do for index in $(seq 0 $(($(printf '%s\n' "$list" | jq length) - 1))); do
printf '%s\n' "$list" | jq ".[$index]" | "$@" || return $? printf '%s\n' "$list" | jq ".[$index]" | "$@" || return
done done
} }
...@@ -236,7 +236,7 @@ _forEachPEM () { ...@@ -236,7 +236,7 @@ _forEachPEM () {
case "$line" in case "$line" in
'-----END '*'-----') '-----END '*'-----')
if "$tester" "$line"; then if "$tester" "$line"; then
printf '%s\n' "$current" | "$@" || return $? printf '%s\n' "$current" | "$@" || return
fi fi
current='' current=''
;; ;;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment