about summary refs log tree commit diff
path: root/rebuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rebuild.sh')
-rwxr-xr-xrebuild.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/rebuild.sh b/rebuild.sh
index c38145e..2e2dfdd 100755
--- a/rebuild.sh
+++ b/rebuild.sh
@@ -36,6 +36,7 @@ echo "NixOS Rebuilding..."
 
 # Rebuild, output simplified errors, log trackebacks
 sudo nixos-rebuild switch --flake $DIR 2>&1 | tee nixos-switch.log
+cat nixos-switch.log | grep --color error && exit 1
 
 # Get current generation metadata
 current=$(nixos-rebuild list-generations | grep current)