Skip to content

Commit

Permalink
fix: Abort shared setup script if any step returns errors (WIP!!)
Browse files Browse the repository at this point in the history
WARNING: THIS IS A WIP. We should thoroughly check that all scripts will successfully end
with a success before considering this work done. Some may end with and if/and line that
may register as an exit with a non-zero exit code.

ORIGINAL COMMIT MESSAGE:

Sometimes the steps will have conditions that are critical and will abort. But the shared
setup script will just carry on to the next step. If any step returns a non-zero error
code, the process should abort.
  • Loading branch information
joshuacurtiss committed Dec 10, 2024
1 parent e309796 commit b9cc314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ done
for (( i=0; i<REPLY; i++ )); do
script="${scripts[$i]}"
clear
$script
! $script && echo "$(tput setaf 1)Since there was an error, we are aborting.$(tput sgr0)" && exit 1
sleep 5
done

0 comments on commit b9cc314

Please sign in to comment.