about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-11T23·56+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-11T23·56+0200
commitc48617671df2a1b894f802bf78f97e9c9dd7cf27 (patch)
tree5dc1c76fb83a898327ba356c98c02ebe73235377
parentd1e4b76a3a05ff01d3689c9433729f38e10ba9a9 (diff)
nix-channel: Fix bogus error message caused by 8a84bd8c8bda1e4c6764c10ecdef9d74e4884800
-rwxr-xr-xscripts/nix-channel.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in
index 0b499c3f7927..05716645a780 100755
--- a/scripts/nix-channel.in
+++ b/scripts/nix-channel.in
@@ -116,13 +116,13 @@ sub update {
 
         my $path;
         my $ret = -1;
-        if (-e "$tmpdir/$filename") {
-            # Get our temporary download into the store
+        if (-e "$tmpdir/$filename" && $filename =~ /\.tar\.(gz|bz2|xz)$/) {
+            # Get our temporary download into the store.
             (my $hash, $path) = `PRINT_PATH=1 QUIET=1 $Nix::Config::binDir/nix-prefetch-url 'file://$tmpdir/$filename'`;
             chomp $path;
 
             # Try unpacking the expressions to see if they'll be valid for us to process later.
-            # Like anything in nix, this will cache the result so we don't do it again outside of the loop below
+            # Like anything in nix, this will cache the result so we don't do it again outside of the loop below.
             $ret = system("$Nix::Config::binDir/nix-build --no-out-link -E 'import <nix/unpack-channel.nix> " .
                           "{ name = \"$cname\"; channelName = \"$name\"; src = builtins.storePath \"$path\"; }'");
         }