Skip to content

Conversation

@luca0N
Copy link

@luca0N luca0N commented Oct 29, 2025

Use the `-f' option to instruct curl to exit with a non-zero exit code if the HTTP response indicates an error via its status code. This is the default behavior for wget, but curl will send the request and exit normally (with exit code equals to zero), as long as it's received a response from the server.

Note that this issue is already fixed by #1908. The only change this pull request does is change two lines to add the `-f' option to curl. I figured that since GitHub is blocking users that are logged off from downloading repository files1, this would be useful since my user.js file is being updated incorrectly, and GitHub's error message is being erroneously written to that file.

Footnotes

  1. https://github.com/orgs/community/discussions/159123

Use the `-f' option to instruct curl to exit with a non-zero exit code
if the HTTP response indicates an error via its status code.  This is
the default behavior for wget, but curl will send the request and exit
normally (with exit code equals to zero), as long as it's received a
response from the server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant