Skip to content

Commit

Permalink
use failed if for return value
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasLarson committed Oct 25, 2020
1 parent f41238b commit 9019197
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ chmod 755 $program
if [[ -x ./$program ]]; then
printf 'Compiled program verified as executable...\n\n'
else
return 1

# use the failed `if`’s return code
# https://github.com/ohmyzsh/ohmyzsh/pull/9238#discussion_r484806772
return $?
fi

# test running the executable ourselves
Expand Down

0 comments on commit 9019197

Please sign in to comment.