Open latenitefilms opened 11 months ago
I've now updated to macOS Sonoma - so I'll test this properly at some point.
Isn't this broken on ARM macs? I think we hardcode /usr/local and that's less correct on ARM macOS? Homebrew at least uses /opt on Apple Silicon.
I'm wrong, it works fine.
@cmsj did you do anything specific to make it work? I've tried both hs.ipc.cliInstall()
and hs.ipc.cliInstall("/opt/homebrew")
- no luck
hs.ipc.cliInstall() was failing for me as well. I 'solved' the issue by manually setting the symlinks for the cli tool, hs, and the man page. My first attempt at creating the symlink resulted in a "permission denied" error on /usr/local/bin. sudo-ing fixed that.
@cmsj - I think really the only way to solve this is to prompt for admin permissions?
I've been thinking about this and we don't really need to "install" these anywhere at all... it's cleaner and more traditional, but if the PATH and MANPATH environment variables are set properly, they can point inside of the Hammerspoon.app bundle itself...
Of course we'd need to provide a function to show them what to add to the appropriate shell file, at least a bash and zsh version to cover Apple's default shells -- I think the syntax is identical, but the files differ.
Hmm... actually we might need to move them around a little bit to make that work since zsh infers the man path... not sure about bash, though.
But the point remains, we could arrange them within the bundle such that "installation" is no longer required, just a change to PATH (and maybe MANPATH) in their shell login scripts.
I've had a few reports that
hs.ipc.cliInstall()
no longer works on macOS Sonoma on CommandPost.I'm still on Monterey on my day-to-day machine, so haven't had a chance to properly look into it yet.
Will try have a proper look when I get a chance.