about summary refs log tree commit diff stats
path: root/update.sh
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-05-28 21:45:22 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-05-28 21:45:22 +0200
commit547d0b2e455ece17a2bcc3302b64bc7f682d081e (patch)
tree9f9f85efd2c7f56eaffe71fb50d0ee64473a542d /update.sh
parentinputs.nix: Switch to `nixos-unstable-small` (diff)
downloadnixos-config-547d0b2e455ece17a2bcc3302b64bc7f682d081e.zip
update.sh: Exit, when an update command fails
Diffstat (limited to '')
-rwxr-xr-xupdate.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/update.sh b/update.sh
index 25dd6bec..7f583808 100755
--- a/update.sh
+++ b/update.sh
@@ -16,7 +16,10 @@ __update_sh_run() {
 
     printf "\033[35;1m> \033[0m\033[35;1m%s\033[0m\n" "Running '$(basename "$__update_sh_command") $*' .."
 
-    "$__update_sh_command" "$@"
+    if ! "$__update_sh_command" "$@"; then
+        printf "ERROR: Command failed ('%s')\n" "$__update_sh_command"
+        exit 1
+    fi
 
     unset __update_sh_command
 }