Skip to content

Commit 49fef76

Browse files
handled exit status
Signed-off-by: Shashank Reddy Boyapally <sboyapal@redhat.com>
1 parent 9a02853 commit 49fef76

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test.bats

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
run_cmd(){
77
echo "$@"
8-
EXIT_CODE=${@}
8+
set +e
9+
${@}
10+
EXIT_CODE=$?
11+
set -e
912

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

0 commit comments

Comments
 (0)