From de93af5cfb8d0bccfc6b1ea8b1fc0bf2e7a96f90 Mon Sep 17 00:00:00 2001 From: Joshua Yuen Date: Thu, 21 Aug 2025 11:19:57 -0400 Subject: [PATCH] Return non-zero exit code upon build failure --- build-iso.sh | 5 +++++ rebuild.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/build-iso.sh b/build-iso.sh index ed6c32a..6d40318 100755 --- a/build-iso.sh +++ b/build-iso.sh @@ -3,4 +3,9 @@ echo "Building ISO ..." nix build .#nixosConfigurations.live.config.system.build.isoImage +if [ $? -ne 0 ]; then + echo "Failed to build ISO" + exit 1 +fi + echo "Done!" diff --git a/rebuild.sh b/rebuild.sh index 4f46ea4..eafe880 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -6,4 +6,9 @@ rm -f ./vm.qcow2 echo "Building new VM ..." nix build .#nixosConfigurations.nixosvm.config.system.build.vm +if [ $? -ne 0 ]; then + echo "Failed to build VM" + exit 1 +fi + echo "Done!"