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

Don't hardcode homebrew prefix #1295

Merged
merged 2 commits into from
Aug 5, 2022
Merged

Conversation

casey
Copy link
Owner

@casey casey commented Jul 28, 2022

Hey @nk9, does this look better? This avoids hard-coding the homebrew prefix of /opt/homebrew, and just calling brew shellenv. I think this might be necessary on systems where brew is in /usr/local.

@nk9
Copy link
Contributor

nk9 commented Jul 30, 2022

I haven't forgotten about this! Would like to make this change, but I wanted to do a bit of research on Homebrew first. Will reply soon.

@nk9
Copy link
Contributor

nk9 commented Aug 5, 2022

The problem with this suggestion is that brew isn't in the user's PATH yet. The shellenv script updates PATH to add it, but before that is run the user has to specify the full path to the binary.

However, I have learned that currently, Homebrew can be installed in THREE different places, depending on platform:

/usr/local for macOS Intel, /opt/homebrew for Apple Silicon and /home/linuxbrew/.linuxbrew for Linux

Sooo… I guess that needs to be mentioned in the README text too, since this code will not work for the majority of users right now who are on Intel Macs.

@nk9
Copy link
Contributor

nk9 commented Aug 5, 2022

See #1304

@casey casey enabled auto-merge (squash) August 5, 2022 17:26
@casey casey merged commit c6809b3 into master Aug 5, 2022
@casey casey deleted the avoid-hard-coding-homebrew-prefix branch August 5, 2022 17:28
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.

2 participants