diff mbox series

[8/8,B,SRU,L-R-M] UBUNTU: [Packaging] file-downloader not handling positive failures correctly

Message ID 20200529143751.2218526-9-alberto.milone@canonical.com
State New
Headers show
Series Add signed modules for the new NVIDIA -server drivers | expand

Commit Message

Alberto Milone May 29, 2020, 2:37 p.m. UTC
From: Andy Whitcroft <apw@canonical.com>

Seems we are not handling positive failures such as 404 correctly.  Add
--fail to get server reported errors converted into errors.

BugLink: https://bugs.launchpad.net/bugs/1878897
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 debian/scripts/file-downloader | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/debian/scripts/file-downloader b/debian/scripts/file-downloader
index 46ae962..0ebfb4d 100755
--- a/debian/scripts/file-downloader
+++ b/debian/scripts/file-downloader
@@ -20,7 +20,7 @@  do
 
 	echo "II: $what $url"
 
-	curl --silent --show-error "$url" -o "$to" -D "$to.hdr" || exit 1
+	curl --silent --fail --show-error "$url" -o "$to" -D "$to.hdr" || exit 1
 	redirect=$(awk '/^Location: / {gsub(/^[[:space:]]+|[[:space:]]+$/,"",$2); print $2;}' "$to.hdr")
 	[ -z "$redirect" ] && break
 	what='  following'