Skip to content

Commit 0d93ab9

Browse files
Ludvig Janiukerikj79
authored andcommitted
8297000: [jib] Add more friendly warning for proxy issues
Reviewed-by: erikj, ihse
1 parent 5b3d86f commit 0d93ab9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bin/jib.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ install_jib() {
128128
exit 1
129129
fi
130130
fi
131+
# Want to check the filetype using file, to see if we got served a HTML error page.
132+
# This is sensitive to the filename containing a specific string, but good enough.
133+
file ${installed_jib_script}.gz | grep "gzip compressed data" > /dev/null
134+
if [ $? -ne 0 ]; then
135+
echo "Warning: ${installed_jib_script}.gz is not a gzip file."
136+
echo "If you are behind a proxy you may need to configure exceptions using no_proxy."
137+
echo "The download URL was: ${jib_url}"
138+
exit 1
139+
fi
131140
echo "Extracting JIB bootstrap script"
132141
rm -f "${installed_jib_script}"
133142
gunzip "${installed_jib_script}.gz"

0 commit comments

Comments
 (0)