Prevent curl from masking certain download errors

An attempt at fixing #6654
This commit is contained in:
Conny Brunnkvist 2021-09-13 16:53:47 +07:00 committed by GitHub
parent 8d10151731
commit f4555e8682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

3
sbt
View File

@ -118,7 +118,7 @@ download_url () {
local jar="$2"
mkdir -p $(dirname "$jar") && {
if command -v curl > /dev/null; then
curl --silent -L "$url" --output "$jar"
curl --fail --silent -L "$url" --output "$jar"
elif command -v wget > /dev/null; then
wget --quiet -O "$jar" "$url"
fi
@ -151,6 +151,7 @@ acquire_sbt_jar () {
exit 2
fi
else
echoerr "('shasum' missing on path - $launcher_sv integrity check SKIPPED!)"
mv "${download_jar}.temp" "${download_jar}"
fi
if [[ -f "$download_jar" ]]; then