Skip to content

Commit

Permalink
fix(install): actually return right error codes
Browse files Browse the repository at this point in the history
Previously exit was called with the stdout content of
the main function. This did not make sense and
resulted in the script not returning the expected
exit codes when main returned a non-zero code.

Strangely enough this broken code was introduced in
response to anchore#1566 but I do not see how it ever worked
unless the script used to echo its intended exit code.

Signed-off-by: Stefan Hacker <[email protected]>
  • Loading branch information
hacst committed Feb 22, 2024
1 parent cdf1e0b commit 6082252
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ main() (
set +u
if [ -z "${TEST_INSTALL_SH}" ]; then
set -u
exit $(main "$@")
main "$@"
exit $?
fi
set -u
set -u

0 comments on commit 6082252

Please sign in to comment.