Originally created by @krayon on GitHub (Mar 16, 2020).
Commit 0af7f388d6 added an error code check for
older curl versions that return an initialisation error (2) on version check.
From my tests 7.10 from 2002 is the last to do this I believe FYI:
check exitcode of `curl -V` because of some issue with ancient versions of curl returning error codes on checking the version number
+ # curl returns with an error code in some ancient versions so we have to catch that
+ set +e
+ curl -V > /dev/null 2>&1
+ set -e
+ retcode="$?"
+ if [[ ! "${retcode}" = "0" ]] && [[ ! "${retcode}" = "2" ]]; then
+ _exiterr "This script requires curl."
+ fi
A regression was introduced in 68274646bb , that
breaks the retcode assignment as it's now coming from the awk, not the curl:
curl: use custom user agent (temporarily using a bit of 1337)
- curl -V > /dev/null 2>&1
+ CURL_VERSION="$(curl -V 2>&1 | head -n1 | awk '{print $2}')"
Originally created by @krayon on GitHub (Mar 16, 2020).
Commit 0af7f388d6e63e74920e5f0cc9ae21f717d223d1 added an error code check for
older curl versions that return an initialisation error (2) on version check.
From my tests 7.10 from 2002 is the last to do this I believe FYI:
```diff
check exitcode of `curl -V` because of some issue with ancient versions of curl returning error codes on checking the version number
+ # curl returns with an error code in some ancient versions so we have to catch that
+ set +e
+ curl -V > /dev/null 2>&1
+ set -e
+ retcode="$?"
+ if [[ ! "${retcode}" = "0" ]] && [[ ! "${retcode}" = "2" ]]; then
+ _exiterr "This script requires curl."
+ fi
```
A regression was introduced in 68274646bbb40e733d9fb5f3b0590d124a3aaea9 , that
breaks the `retcode` assignment as it's now coming from the `awk`, not the
`curl`:
```diff
curl: use custom user agent (temporarily using a bit of 1337)
- curl -V > /dev/null 2>&1
+ CURL_VERSION="$(curl -V 2>&1 | head -n1 | awk '{print $2}')"
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @krayon on GitHub (Mar 16, 2020).
Commit
0af7f388d6added an error code check forolder curl versions that return an initialisation error (2) on version check.
From my tests 7.10 from 2002 is the last to do this I believe FYI:
A regression was introduced in
68274646bb, thatbreaks the
retcodeassignment as it's now coming from theawk, not thecurl: