verify scripts: preserve exit code

these scripts used the result variable pattern but then explicitly exited early with a hardcoded value ....
This commit is contained in:
Benjamin Elder
2025-05-14 21:19:45 -07:00
parent d96cbb17fc
commit ef0547741d
10 changed files with 8 additions and 10 deletions

View File

@@ -49,5 +49,5 @@ else
>&2 echo "See: test/images/agnhost/README.md"
>&2 echo ""
>&2 echo "You can reach out to https://git.k8s.io/community/sig-testing for help."
exit 1
fi
exit $ret

View File

@@ -238,7 +238,6 @@ else
fi
echo
} >&2
exit 1
fi
# preserve the result

View File

@@ -133,7 +133,6 @@ else
echo 'See: https://github.com/koalaman/shellcheck/wiki/Ignore#ignoring-one-specific-instance-in-a-file'
echo
} >&2
exit 1
fi
# preserve the result

View File

@@ -40,5 +40,5 @@ if [[ $ret -eq 0 ]]; then
echo "${DIFFROOT} up to date."
else
echo "${DIFFROOT} is out of date. Please run hack/update-codegen.sh"
exit 1
fi
exit $ret

View File

@@ -40,5 +40,5 @@ if [[ $ret -eq 0 ]]; then
echo "${DIFFROOT} up to date."
else
echo "${DIFFROOT} is out of date. Please run hack/update-codegen.sh"
exit 1
fi
exit $ret

View File

@@ -40,7 +40,7 @@ if [[ $ret -eq 0 ]]; then
echo "${DIFFROOT} up to date."
else
echo "${DIFFROOT} is out of date. Please run hack/update-codegen.sh"
exit 1
exit $ret
fi
# smoke test

View File

@@ -40,5 +40,5 @@ if [[ $ret -eq 0 ]]; then
echo "${DIFFROOT} up to date."
else
echo "${DIFFROOT} is out of date. Please run hack/update-codegen.sh"
exit 1
fi
exit $ret

View File

@@ -40,5 +40,5 @@ if [[ $ret -eq 0 ]]; then
echo "${DIFFROOT} up to date."
else
echo "${DIFFROOT} is out of date. Please run hack/update-codegen.sh"
exit 1
fi
exit $ret

View File

@@ -40,5 +40,5 @@ if [[ $ret -eq 0 ]]; then
echo "${DIFFROOT} up to date."
else
echo "${DIFFROOT} is out of date. Please run hack/update-codegen.sh"
exit 1
fi
exit $ret

View File

@@ -40,5 +40,5 @@ if [[ $ret -eq 0 ]]; then
echo "${DIFFROOT} up to date."
else
echo "${DIFFROOT} is out of date. Please run hack/update-codegen.sh"
exit 1
fi
exit $ret