Skip to content

Commit

Permalink
handled exit status
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
  • Loading branch information
shashank-boyapally committed Sep 13, 2024
1 parent 9a02853 commit 49fef76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

run_cmd(){
echo "$@"
EXIT_CODE=${@}
set +e
${@}
EXIT_CODE=$?
set -e

if [ $EXIT_CODE -eq 2 ]; then
echo "Exit code 2 encountered, regression detected, treating as success"
Expand Down

0 comments on commit 49fef76

Please sign in to comment.