From 0d93ab9dff04409469faa26d5cdb29c4d6488537 Mon Sep 17 00:00:00 2001 From: Ludvig Janiuk Date: Wed, 23 Nov 2022 14:26:45 +0000 Subject: [PATCH] 8297000: [jib] Add more friendly warning for proxy issues Reviewed-by: erikj, ihse --- bin/jib.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/jib.sh b/bin/jib.sh index da2f84153cc..8916067fbed 100644 --- a/bin/jib.sh +++ b/bin/jib.sh @@ -128,6 +128,15 @@ install_jib() { exit 1 fi fi + # Want to check the filetype using file, to see if we got served a HTML error page. + # This is sensitive to the filename containing a specific string, but good enough. + file ${installed_jib_script}.gz | grep "gzip compressed data" > /dev/null + if [ $? -ne 0 ]; then + echo "Warning: ${installed_jib_script}.gz is not a gzip file." + echo "If you are behind a proxy you may need to configure exceptions using no_proxy." + echo "The download URL was: ${jib_url}" + exit 1 + fi echo "Extracting JIB bootstrap script" rm -f "${installed_jib_script}" gunzip "${installed_jib_script}.gz"