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
brew.sh: don't require /usr/local/Cellar creation. #780
Conversation
Note: this is probably something we may need a smarter migration to handle that this but thought I'd open the easy PR to get some thoughts. |
As long as this doesn't prevent someone from making (say) |
I'm a little surprised that the Cellar could be located underneath
When they're the same value, the |
@chdiza It would not. |
29b0cd6
to
de44930
Compare
I've changed the approach here so this will only affect people who don't have |
then | ||
HOMEBREW_CELLAR="$HOMEBREW_PREFIX/Cellar" | ||
elif [[ "$HOMEBREW_PREFIX" == "/usr/local" && |
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.
Please use a single =
for string comparison in shell code for consistency with existing code.
How about instead of further complicating the logic, we simply change the default (if no # Where we store built products; a Cellar in HOMEBREW_PREFIX (often /usr/local)
# unless there's already a Cellar in HOMEBREW_REPOSITORY.
if [[ -d "$HOMEBREW_REPOSITORY/Cellar" ]]
then
HOMEBREW_CELLAR="$HOMEBREW_REPOSITORY/Cellar"
else
HOMEBREW_CELLAR="$HOMEBREW_PREFIX/Cellar"
fi The only users for which this might cause trouble are users that have |
@UniqMartin That makes sense to me and seems suitably non-disruptive 👍 |
If you're using e.g. a `/usr/local/homebrew` prefix then don't require the `/usr/local/Cellar` to be manually created to avoid e.g. `/usr/local/homebrew/Cellar` being used. Let's do all we can to let people use this `Cellar` location as it means they can put their repository wherever they like and still use all our bottles.
de44930
to
eabc8a2
Compare
🎉 |
brew tests
with your changes locally?If you're using e.g. a
/usr/local/homebrew
prefix then don't require the/usr/local/Cellar
to be manually created to avoid e.g./usr/local/homebrew/Cellar
being used. Let's do all we can to letpeople use this
Cellar
location as it means they can put their repository wherever they like and still use all our bottles.CC @Homebrew/maintainers for thoughts as it's a pretty big change and @chdiza as this was part of your neat
/usr/local/homebrew
installation hack that I'm enjoying.