about summary refs log tree commit diff
path: root/scripts/install-nix-from-closure.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-05-01T13·48+0200
committerGitHub <noreply@github.com>2019-05-01T13·48+0200
commit989cb3777753024072160776ea37348689b89d44 (patch)
tree7c39520de3655e5ca4c4aa167ab58c1cc3e2e1f9 /scripts/install-nix-from-closure.sh
parent83f2b110cecf50877ce1585c698dbed6dd225562 (diff)
parentb9567aa8b6f935522d1037377e0e5205a7529fd8 (diff)
Merge pull request #2679 from bjornfor/offline-install
install script: don't abort when "nix-channel --update" fails
Diffstat (limited to 'scripts/install-nix-from-closure.sh')
-rw-r--r--scripts/install-nix-from-closure.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh
index fc633fa2337e..7810a6461be3 100644
--- a/scripts/install-nix-from-closure.sh
+++ b/scripts/install-nix-from-closure.sh
@@ -132,7 +132,10 @@ if ! $nix/bin/nix-channel --list | grep -q "^nixpkgs "; then
     $nix/bin/nix-channel --add https://nixos.org/channels/nixpkgs-unstable
 fi
 if [ -z "$_NIX_INSTALLER_TEST" ]; then
-    $nix/bin/nix-channel --update nixpkgs
+    if ! $nix/bin/nix-channel --update nixpkgs; then
+        echo "Fetching the nixpkgs channel failed. (Are you offline?)"
+        echo "To try again later, run \"nix-channel --update nixpkgs\"."
+    fi
 fi
 
 added=