diff options
author | Malfurious <m@lfurio.us> | 2023-08-18 13:00:31 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2023-08-18 13:45:53 -0400 |
commit | 4d72b3f149a2bb80b5d371e661eb80324e2442bc (patch) | |
tree | 06db695d8282439625a30120ccf1bb6252c5d488 /acid/cychedelic | |
parent | d5c380f477f2913effd632cf58aff287062bf593 (diff) | |
download | cychedelic-4d72b3f149a2bb80b5d371e661eb80324e2442bc.tar.gz cychedelic-4d72b3f149a2bb80b5d371e661eb80324e2442bc.zip |
acid: Improve git error handling
Exit early from the cyche-source script on key git errors, where
previously we would mindlessly continue on to execute a bunch of broken
commands. Errors at this stage should be caught to prevent an attempt
to build and deploy the code (even --force 'd builds).
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to '')
-rwxr-xr-x | acid/cychedelic | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/acid/cychedelic b/acid/cychedelic index 4e26b99..273a041 100755 --- a/acid/cychedelic +++ b/acid/cychedelic @@ -23,9 +23,12 @@ update() { for line in "${CYCHE_SERVICES[@]}"; do read -r -a arr <<< "$line" hash=$(cyche-source ${arr[@]:0:3}) + res=$? - if [ $? -ne 0 ] || [ "$1" == "$forceopt" ]; then - cyche-build "${arr[0]}" "${arr[3]}" "$hash" $selfopt + if [ $res -ne 2 ]; then + if [ $res -eq 1 ] || [ "$1" == "$forceopt" ]; then + cyche-build "${arr[0]}" "${arr[3]}" "$hash" $selfopt + fi fi forceopt="--force" |