mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Report substituter errors to clients of the Nix daemon
This commit is contained in:
parent
4d1b64f118
commit
c770a2422a
5 changed files with 53 additions and 30 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue