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
install: fix HEAD
installations with HOMEBREW_INSTALL_FROM_API
#12087
Conversation
Review period will end on 2021-09-21 at 00:00:00 UTC. |
Review period ended. |
Looks good thanks @Rylan12! |
default_specified_path = alias_path || path | ||
|
||
return default_specified_path if default_specified_path.presence&.exist? |
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.
alias_path
is a String rather than a Pathname, so this can error in that scenario.
I'm tempted to make alias_path
a Pathname but that would be an API change.
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.
default_specified_path = alias_path || path | |
return default_specified_path if default_specified_path.presence&.exist? | |
default_specified_path = Pathname(alias_path) || path | |
return default_specified_path if default_specified_path.presence&.exist? |
This will remove the error possibility, 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.
Pathname(nil)
is an error unfortunately.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?This PR should fix the issues that
HOMEBREW_INSTALL_FROM_API
brought to HEAD formulae. Now,brew install --HEAD
,brew outdated --fetch-HEAD
,brew upgrade --fetch-HEAD
should all work as expected.CC @carlocab (if you could confirm that this fixes your issue I'd appreciate it, sorry I didn't get to fixing it earlier)