diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-01T15·19-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-01T15·19-0400 |
commit | c770a2422a47526d5eb336af6af4292df68dad2b (patch) | |
tree | 6e31681dc8349381fa9c62d17292d322548d3d91 /scripts/download-from-binary-cache.pl.in | |
parent | 4d1b64f118cf6ebcbf530bea4a3c531704d7d6ba (diff) |
Report substituter errors to clients of the Nix daemon
Diffstat (limited to 'scripts/download-from-binary-cache.pl.in')
-rw-r--r-- | scripts/download-from-binary-cache.pl.in | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/scripts/download-from-binary-cache.pl.in b/scripts/download-from-binary-cache.pl.in index 3f7d3ef45f4a..94c446e37a4c 100644 --- a/scripts/download-from-binary-cache.pl.in +++ b/scripts/download-from-binary-cache.pl.in @@ -184,13 +184,9 @@ sub getAvailableCaches { my @trustedUrls = (@urls, strToList($Nix::Config::config{"trusted-binary-caches"} // "")); @urls = (); foreach my $url (@untrustedUrls) { - if (any { $url eq $_ } @trustedUrls) { - push @urls, $url; - } else { - # FIXME: should die here, but we currently can't - # deliver error messages to clients. - warn "warning: binary cache ‘$url’ is not trusted (please add it to ‘trusted-binary-caches’ in $Nix::Config::confDir/nix.conf)\n"; - } + die "binary cache ‘$url’ is not trusted (please add it to ‘trusted-binary-caches’ in $Nix::Config::confDir/nix.conf)\n" + unless any { $url eq $_ } @trustedUrls; + push @urls, $url; } } |