Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix completion generation for --repository #17728

Merged
merged 2 commits into from
Jul 14, 2024

Conversation

BrewTestBot
Copy link
Member

Autogenerated by the sponsors-maintainers-man-completions workflow.

MikeMcQuaid
MikeMcQuaid previously approved these changes Jul 14, 2024
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZhongRuoyu This doesn't seem like what we want unfortunately 🙃

@samford
Copy link
Member

samford commented Jul 14, 2024

Looks like our completions setup doesn't understand the new bash brew --repo from #17726.

@ZhongRuoyu
Copy link
Member

Yea, unfortunately, it seems our completion generator is not able to handle Bash commands like that...

@MikeMcQuaid
Copy link
Member

@ZhongRuoyu A workaround for now would be to keep the Ruby file around just for fixing the completions. Could just make it raise UsageError in run?

@MikeMcQuaid MikeMcQuaid dismissed their stale review July 14, 2024 18:05

Don't want to merge this

@ZhongRuoyu ZhongRuoyu force-pushed the sponsors-maintainers-man-completions branch from bbd5d3f to 901f910 Compare July 14, 2024 18:34
@ZhongRuoyu
Copy link
Member

Could just make it raise UsageError in run?

I used StandardError instead so that the "Please report this issue" message is displayed if it's somehow run:

$ brew --repo homebrew/core
Error: StandardError
Warning: Removed Sorbet lines from backtrace!
Rerun with `--verbose` to see the original backtrace
/usr/local/Homebrew/Library/Homebrew/cmd/--repository.rb:29:in `run'
/usr/local/Homebrew/Library/Homebrew/brew.rb:95:in `<main>'
Please report this issue:
  https://docs.brew.sh/Troubleshooting

@ZhongRuoyu ZhongRuoyu changed the title Update manpage and completions. Fix completion generation for --repository Jul 14, 2024
@MikeMcQuaid
Copy link
Member

Thanks @ZhongRuoyu!

@ZhongRuoyu ZhongRuoyu force-pushed the sponsors-maintainers-man-completions branch from 3d9879f to 8ae18f4 Compare July 14, 2024 18:47
@MikeMcQuaid MikeMcQuaid merged commit fd62a15 into master Jul 14, 2024
24 checks passed
@MikeMcQuaid MikeMcQuaid deleted the sponsors-maintainers-man-completions branch July 14, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants