From 8dbb310e02d0517e0bf23e5f697d5f2e4311f6fc Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Mon, 17 Nov 2025 01:45:53 +0800 Subject: [PATCH] fix(zshrc): bnd exit when build error --- .zshrc2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zshrc2 b/.zshrc2 index 0b92a98..a2776ab 100644 --- a/.zshrc2 +++ b/.zshrc2 @@ -137,7 +137,7 @@ sagt() { eval "$($DOTFILES/tools/sagent.sh $@)" ; } use() { nix --experimental-features nix-command --extra-experimental-features flakes shell "${(*)@/#%(#b)([^#]#)/nixpkgs#$match}" ; } bnd() { if [[ -n "$1" && -d "./hosts/$1" ]]; then - nixos-rebuild --flake .#$1 build + nixos-rebuild --flake .#$1 build || return $? nix-diff /opt/NixOS-Config/results/hosts/$1 ./result --color=always | less else echo host $1 does not exist