Skip to content

Commit

Permalink
Add --compressed to curl command
Browse files Browse the repository at this point in the history
This prevents 403 errors on help.github.com (github/docs#17358).
  • Loading branch information
marcwrobel committed Aug 1, 2022
1 parent 6586b7d commit cc5ea86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion checklinks
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color

# --compressed : https://github.com/github/docs/issues/17358
function doCurl() {
curl -o /dev/null --silent --connect-timeout "$TIMEOUT" --retry $RETRY --retry-delay $RETRY_DELAY --user-agent "$USER_AGENT" --location --write-out '%{http_code}' "$1"
curl -o /dev/null --silent --compressed --connect-timeout "$TIMEOUT" --retry $RETRY --retry-delay $RETRY_DELAY --user-agent "$USER_AGENT" --location --write-out '%{http_code}' "$1"
}

[ ! -d "$1" ] && echo "'$1' is not a directory" && exit 1
Expand Down

0 comments on commit cc5ea86

Please sign in to comment.