Open bradyjoslin opened 1 month ago
Thanks for reporting! Do you know if this is a new development? Have you found any recommendations online about where we should put a binary?
Package managers like brew began changing their install target location when Apple Silicon came out, details here. As far as I can tell, this simply makes the directory less likely to have been previously created on the user's machine.
Believe a quick fix is to create the /usr/local/bin
directory if it doesn't already exist as part of the install process. Here's an example from elsewhere.
Other options would be to install in either ~/.local/opt/
or ~/.local/bin
. Benefit would be not requiring root. Similarly, would also require checking if the directory exists and making it if it doesn't, with the addition of making sure it is in the user's PATH
. See webi as an example.
Lastly, perhaps consider adding a brew tap as an install option. goreleaser automates that quite nicely.
If homebrew uses /usr/local/bin
exclusively for x86_64
and it doesn't always exists now, it sounds like we should consider alternative install dirs. Local installs sound nice, but for consistency, at least for now I think it would be good to still do a system install.
I don't have a Mac handy, I'll ask the team if they have any ideas.
While /usr/local/bin
does not exist, it appears to be in $PATH
so it should still be a valid place to install. Added creating it if it doesn't exist https://github.com/extism/cli/pull/90/commits/bd06bf2ec74d7bb16b8586b6f459c2010c022309