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
add function to define path #10031
add function to define path #10031
Conversation
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.
Nice refactor! Perhaps in cases where only
is used once then args.only_path_formula_or_cask
could be passed as a parameter directly?
Thank you for the advice. I will change |
7ab7478
to
54e0413
Compare
Library/Homebrew/cli/args.rb
Outdated
@@ -133,6 +133,11 @@ def context | |||
Context::ContextStruct.new(debug: debug?, quiet: quiet?, verbose: verbose?) | |||
end | |||
|
|||
def only_path_formula_or_cask |
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.
def only_path_formula_or_cask | |
def only_formula_or_cask |
Not sure why path
should be in the name.
Given that all of these are passed from def to_paths(only: self.parent&.only_formula_or_cask) |
03b0b88
to
4ac90fa
Compare
4ac90fa
to
0a97cd1
Compare
Thanks again @hyuraku! |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?brew man
locally and committed any changes?refactor how to assign
only
whether:formula
or:cask
in commands likecmd/fetch.rb
.