You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we have changed the installation destination of homebrew, unable to find limactl.
Is there any better solution?
What's happening
Exception
exit status 1: Traceback (most recent call last):
File "./lima-plugin", line 600, in <module>
main()
File "./lima-plugin”, line 578, in main
xbarMenu()
File "./lima-plugin", line 556, in xbarMenu
vms = listVMs()
File "./lima-plugin”, line 256, in listVMs
vmRaw = subprocess.run(
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'limactl'
xbar or swiftbar starts the plugin with PATH as follows:
PATH=/usr/bin:/bin:/usr/sbin:/sbin
My installation directory of homebrew:
% brew --prefix
/Users/${USER}/homebrew
lima-xbar-plugin cannot call limactl because brew --prefix cannot be used.
Custom brew locations are going to be a hassle to deal with automatically. I'll have to add a menu item that lets you set/unset the location of brew, but it's going to have to be a manual process - I can't anticipate all the locations people might stash their brew install in.
That said, sticking it in the home directory seems like it's the most likely alternate location, so I'll add that as one of the default places to search.
This would be a lot easier if macOS gui apps picked up stuff like $PATH from the shell's login environment, but I understand why they don't go that route.
- Check for `~/homebrew/bin` and `~/homebrew/sbin` to cope when homebrew
is installed in a user's home directory. Closes#28
- While we're in there, check for `/usr/local/sbin`,
`/opt/homebrew/sbin`, `/opt/local/sbin`, `~/bin` and `~/sbin`
directories too.
Signed-off-by: Joe Block <[email protected]>
If we have changed the installation destination of homebrew, unable to find limactl.
Is there any better solution?
What's happening
Exception
xbar or swiftbar starts the plugin with PATH as follows:
PATH=/usr/bin:/bin:/usr/sbin:/sbin
My installation directory of homebrew:
lima-xbar-plugin cannot call limactl because brew --prefix cannot be used.
Temporary workaround
Add the
homebrew/bin
path directly to extrapathsExpected results
The path of homebrew/bin is automatically resolved and limactl can be called.
Then xbar or swiftbar will not generate any errors.
The text was updated successfully, but these errors were encountered: