mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 09:33:41 +00:00
nixos-rebuild: make 'pull' fail in case it did not pull anything.
This commit is contained in:
parent
dbe2325603
commit
5b7c019e2a
@ -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 '<nixos>' -A manifests \
|
||||
| grep '<string' | sed 's^.*"\(.*\)".*^\1^g')
|
||||
|
||||
set -o nopipefail
|
||||
[ "$action" = pull -a $? -ne 0 ] && exit 1
|
||||
|
||||
mkdir -p /nix/var/nix/channel-cache
|
||||
for i in $manifests; do
|
||||
NIX_DOWNLOAD_CACHE=/nix/var/nix/channel-cache nix-pull $i || true
|
||||
|
Loading…
Reference in New Issue
Block a user