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
Support the rc shell. Fixes #16264 #16265
Conversation
(In my tests, changes to `shellenv.sh` weren't required, so I didn't bother.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Initially opposed this but given how relatively lightweight it is, with a little refactoring I'm 👍🏻
Library/Homebrew/utils/shell.rb
Outdated
sig { params(str: String).returns(String) } | ||
def rc_quote(str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you refactor this a bit to share more code with sh_quote
and csh_quote
? All three methods are almost identical bar a line or two.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we assume that Homebrew won’t ever have a ' in any printed file name? If so, sh_quote
would even be sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
The only "special" case about `rc` quoting is that strings that contain apostrophes need to contain double apostrophes instead. It seems unlikely that this will happen in Homebrew.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @dertuxmalwieder!
(In my tests, changes to
shellenv.sh
weren't required, so I didn't bother.)brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Can't type check: Error: Sorbet is not currently supported under system Ruby on macOS Sonoma.