Skip to content

Commit

Permalink
rpms.sh: add --fail option to curl
Browse files Browse the repository at this point in the history
When curl is called it will now use --fail option. This will ensure that
if target doesn't exist curl won't exit with 0 code but 22 instead.
  • Loading branch information
hegerj committed Feb 8, 2019
1 parent 4b2f0b0 commit 614287f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ __INTERNAL_WGET() {
rlLogDebug "$FUNCNAME(): using curl for download"
QUIET="${QUIET:+--silent}"
[[ -t 2 ]] || QUIET="${QUIET:---silent --show-error}"
curl $QUIET --location --retry-connrefused --retry-delay 3 --retry-max-time 3600 --retry 3 --connect-timeout 180 --max-time 1800 --insecure -o $FILE "$URL" || let res++
curl --fail $QUIET --location --retry-connrefused --retry-delay 3 --retry-max-time 3600 --retry 3 --connect-timeout 180 --max-time 1800 --insecure -o $FILE "$URL" || let res++
else
rlLogError "$FUNCNAME(): no tool for downloading web content is available"
let res++
Expand Down

0 comments on commit 614287f

Please sign in to comment.