From 5b7c019e2a5b320589d9d7401ac072e5a0a1dffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 27 Jun 2012 21:36:46 +0200 Subject: [PATCH 1/2] nixos-rebuild: make 'pull' fail in case it did not pull anything. --- modules/installer/tools/nixos-rebuild.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/installer/tools/nixos-rebuild.sh b/modules/installer/tools/nixos-rebuild.sh index 29927f8a126..98b46cb7cdb 100644 --- a/modules/installer/tools/nixos-rebuild.sh +++ b/modules/installer/tools/nixos-rebuild.sh @@ -125,9 +125,13 @@ fi # Pull the manifests defined in the configuration (the "manifests" # attribute). Wonderfully hacky. if [ -n "$pullManifest" -o "$action" = pull ]; then + set -o pipefail manifests=$(nix-instantiate --eval-only --xml --strict '' -A manifests \ | grep ' Date: Wed, 27 Jun 2012 21:56:29 +0200 Subject: [PATCH 2/2] nixos-rebuild: fail if any case of pull fails. --- modules/installer/tools/nixos-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/installer/tools/nixos-rebuild.sh b/modules/installer/tools/nixos-rebuild.sh index 98b46cb7cdb..22aa847e192 100644 --- a/modules/installer/tools/nixos-rebuild.sh +++ b/modules/installer/tools/nixos-rebuild.sh @@ -130,7 +130,7 @@ if [ -n "$pullManifest" -o "$action" = pull ]; then | grep '