aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01 11:19:24 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-08-01 11:19:24 -0400
commitc770a2422a47526d5eb336af6af4292df68dad2b (patch)
tree6e31681dc8349381fa9c62d17292d322548d3d91 /scripts
parent4d1b64f118cf6ebcbf530bea4a3c531704d7d6ba (diff)
Report substituter errors to clients of the Nix daemon
Diffstat (limited to 'scripts')
-rw-r--r--scripts/download-from-binary-cache.pl.in10
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 3f7d3ef45..94c446e37 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;
}
}