5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-23 10:03:33 +03:00

tools: download_file_from_url: adapt error messages to start at new line

the front end expects the error message to be the first part of the
last line. putting the new line at the beginning of the die message
does not work, either.

https://lists.proxmox.com/pipermail/pve-devel/2021-June/048676.html
This commit is contained in:
Lorenz Stechauner 2021-06-16 11:35:57 +02:00 committed by Thomas Lamprecht
parent 9fffe4bc89
commit 43cb80c5f2

View File

@ -1873,7 +1873,8 @@ sub download_file_from_url {
return;
} else {
# we could re-download, but may not be safe so just abort for now..
die "mismatch (got '$checksum_got' != expect '$checksum_expected'), aborting\n";
print "\n"; # the front end expects the error to reside at the last line without any noise
die "checksum mismatch: got '$checksum_got' != expect '$checksum_expected', aborting\n";
}
}
@ -1908,7 +1909,8 @@ sub download_file_from_url {
if (lc($checksum_got) eq lc($checksum_expected)) {
print "OK, checksum verified\n";
} else {
die "ERROR, checksum mismatch: got '$checksum_got' != expect '$checksum_expected'\n";
print "\n"; # the front end expects the error to reside at the last line without any noise
die "checksum mismatch: got '$checksum_got' != expect '$checksum_expected'\n";
}
}