Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
39.65k stars 9.29k forks source link

fix: Display a warning (instead of exiting early) when unable to find recent issues on a tap #17182

Closed boblail closed 2 weeks ago

boblail commented 3 weeks ago

Occasionally, when failing to brew install or brew upgrade a formula, users will get an error message and the last line of it will be:

Error: Validation Failed: [{"message"=>"The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.", "resource"=>"Search", "field"=>"q", "code"=>"invalid"}]

Here's an old public example: https://gitlab.com/tabos/rogerrouter/-/issues/21

At Square, this error can be caused by a transient issue with a user's GitHub credentials.

My proposal is that any error which prevents brew from showing related issues should:

  1. Not cause brew to exit early (vs. printing diagnostic checks and doing any other cleanup)
  2. Be clearly differentiated from the original failure (so it doesn't become a red herring for users troubleshooting their broken formula)

MikeMcQuaid commented 2 weeks ago

Thanks again @boblail!

boblail commented 2 weeks ago

Thanks all!