Commit 5d6ca492 authored by Guillaume Rousse's avatar Guillaume Rousse
Browse files

fix error message handling when download fails

parent 8a774ff4
......@@ -117,10 +117,11 @@ if ($metadataURL) {
if ($verbose) {
echo "Downloading metadata from $metadataURL to $metadataFile\n";
$result = copy($metadataURL, $metadataFile);
$result = @copy($metadataURL, $metadataFile);
if (!$result) {
$error = error_get_last();
exit("Exiting: could not download $metadataURL: $error\n");
$message = explode(': ', $error['message'])[2];
exit("Exiting: could not download $metadataURL: $message");
} else {
if (
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment