forked from lix-project/lix
* Show errors in nix-prefetch-url.
This commit is contained in:
parent
5c793ad03e
commit
dbc0170ed9
|
@ -37,7 +37,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
doDownload() {
|
doDownload() {
|
||||||
@curl@ $cacheFlags --fail -# --show-error --location --max-redirs 20 --disable-epsv \
|
@curl@ $cacheFlags --fail -# --location --max-redirs 20 --disable-epsv \
|
||||||
--cookie-jar $tmpPath/cookies "$url" -o $tmpFile
|
--cookie-jar $tmpPath/cookies "$url" -o $tmpFile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,9 @@ sub downloadFile {
|
||||||
$ENV{"PRINT_PATH"} = 1;
|
$ENV{"PRINT_PATH"} = 1;
|
||||||
$ENV{"QUIET"} = 1;
|
$ENV{"QUIET"} = 1;
|
||||||
my ($dummy, $path) = `$binDir/nix-prefetch-url '$url'`;
|
my ($dummy, $path) = `$binDir/nix-prefetch-url '$url'`;
|
||||||
chomp $path;
|
die "cannot fetch `$url'" if $? != 0;
|
||||||
die "nix-prefetch-url did not return a path" unless defined $path;
|
die "nix-prefetch-url did not return a path" unless defined $path;
|
||||||
|
chomp $path;
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +71,7 @@ sub processURL {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (readManifest($manifest, \%narFiles, \%localPaths, \%patches) < 3) {
|
if (readManifest($manifest, \%narFiles, \%localPaths, \%patches) < 3) {
|
||||||
die "manifest `$url' is too old (i.e., for Nix <= 0.7)\n";
|
die "`$url' is not manifest or it is too old (i.e., for Nix <= 0.7)\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($skipWrongStore) {
|
if ($skipWrongStore) {
|
||||||
|
|
|
@ -265,7 +265,7 @@ print STDERR "uploading manifest...\n";
|
||||||
if ($localCopy) {
|
if ($localCopy) {
|
||||||
copyFile $manifest, $localManifestFile;
|
copyFile $manifest, $localManifestFile;
|
||||||
} else {
|
} else {
|
||||||
system("$curl --show-error --upload-file " .
|
system("$curl --show-error --upload-file " .
|
||||||
"'$manifest' '$manifestPutURL' > /dev/null") == 0 or
|
"'$manifest' '$manifestPutURL' > /dev/null") == 0 or
|
||||||
die "curl failed on $manifest: $?";
|
die "curl failed on $manifest: $?";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue