diff --git a/scripts/download-from-binary-cache.pl.in b/scripts/download-from-binary-cache.pl.in index d073f5bfdc..3303199dac 100644 --- a/scripts/download-from-binary-cache.pl.in +++ b/scripts/download-from-binary-cache.pl.in @@ -7,7 +7,7 @@ use Nix::Store; use DBI; -my @binaryCacheUrls = split / /, ($ENV{"NIX_BINARY_CACHES"} || ""); +my @binaryCacheUrls = map { s/\/+$//; $_ } split(/ /, ($ENV{"NIX_BINARY_CACHES"} || "")); my ($dbh, $insertNAR, $queryNAR); my %cacheIds;