Skip to content

Commit

Permalink
simplify test_fail.sh
Browse files Browse the repository at this point in the history
the default `exit` value is 0 so we do not need to explicitly call it
  • Loading branch information
fkobi authored and HowardHinnant committed Jan 9, 2025
1 parent 632af88 commit 8a1102f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test_fail.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/bin/sh

# show what is to be run
echo $1
eval $1

if [ $? -eq 0 ]; then
exit 0;
fi
exit 1;
# run the command
eval $1 || exit 1 # if fails, return 1

0 comments on commit 8a1102f

Please sign in to comment.