From d09d6d37d7da0c2bf8e9f03aa7434b00c5721bf1 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Sat, 14 Jun 2025 15:24:03 +0800 Subject: [PATCH] fix(rebuild): exit rebuild script on error --- packages/rebuild/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/rebuild/default.nix b/packages/rebuild/default.nix index f4a0dd3..946beeb 100644 --- a/packages/rebuild/default.nix +++ b/packages/rebuild/default.nix @@ -54,14 +54,14 @@ pkgs.writeShellScriptBin "rebuild" # sh if "$TEST_SHELL"; then info "Testing $1..." - nh os test "''${args[@]}" + nh os test "''${args[@]}" || exit 1 git diff HEAD --color=always --stat --patch spawn_test_shell "$1" info "Rebuilding $1..." - nh os boot "''${args[@]}" + nh os boot "''${args[@]}" || exit 1 else info "Rebuilding $1 on $HOSTNAME..." - nh os switch "''${args[@]}" + nh os switch "''${args[@]}" || exit 1 fi if ! "$NO_GENERATION_CHECK"; then