mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-04-30 05:42:43 +00:00
Move test to bottom and switched from $? to $ret
I could refactor the if/else logic to provide curl|wget in the debug message, but wanted to keep the change simple to hopefully get pulled.
This commit is contained in:
parent
83c8248a07
commit
011d39ae23
9
acme.sh
9
acme.sh
@ -520,14 +520,8 @@ _get() {
|
|||||||
if _exists "curl" ; then
|
if _exists "curl" ; then
|
||||||
if [ "$onlyheader" ] ; then
|
if [ "$onlyheader" ] ; then
|
||||||
$CURL -I -A "User-Agent: $USER_AGENT" $url
|
$CURL -I -A "User-Agent: $USER_AGENT" $url
|
||||||
if [ $? -gt 0 ] ;then
|
|
||||||
_err "Curl failed with exit code $?, trying running script with --debug 2"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
$CURL -A "User-Agent: $USER_AGENT" $url
|
$CURL -A "User-Agent: $USER_AGENT" $url
|
||||||
if [ $? -gt 0 ] ;then
|
|
||||||
_err "Curl failed with exit code $?, trying running script with --debug 2"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
_debug "WGET" "$WGET"
|
_debug "WGET" "$WGET"
|
||||||
@ -538,6 +532,9 @@ _get() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
ret=$?
|
ret=$?
|
||||||
|
if [ $ret -gt 0 ] ;then
|
||||||
|
_err "URL get failed with exit code $ret, trying running script with --debug 2"
|
||||||
|
fi
|
||||||
return $ret
|
return $ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user