From 600daf972f9157d358841f76b3292b667c97666f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 Oct 2012 14:21:22 -0400 Subject: [PATCH] download-from-binary-cache: Remove duplicate entries in trustedURLs --- scripts/download-from-binary-cache.pl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/download-from-binary-cache.pl.in b/scripts/download-from-binary-cache.pl.in index 317989e40..305254b5d 100644 --- a/scripts/download-from-binary-cache.pl.in +++ b/scripts/download-from-binary-cache.pl.in @@ -199,7 +199,7 @@ sub getAvailableCaches { # denotes options passed by the client. if (defined $Nix::Config::config{"untrusted-binary-caches"}) { my @untrustedUrls = strToList $Nix::Config::config{"untrusted-binary-caches"}; - my @trustedUrls = (@urls, strToList($Nix::Config::config{"trusted-binary-caches"} // "")); + my @trustedUrls = Nix::Utils::uniq(@urls, strToList($Nix::Config::config{"trusted-binary-caches"} // "")); @urls = (); foreach my $url (@untrustedUrls) { die "binary cache ‘$url’ is not trusted (please add it to ‘trusted-binary-caches’ [@trustedUrls] in $Nix::Config::confDir/nix.conf)\n"