-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Update PATH if the exact kitty executable path is not already present #1352
Conversation
This should be unneccessary, the problem should be fixed by: 13d478f |
My steps to reproduce still work, I can still get the
My commit should fix this. What was the reason that you implemented it this way? Maybe I'm misunderstanding something. |
No, kitty_exe() looks for bundle_exe_dir first. Which means on macOS it will always return the path to the correct exe, so I dont see how your steps could work, unless you are running an unbundled kitty, from source. In which case it is up to you to setup PATH correctly. |
I modified the code to print On a side-note I'm wondering what the difference between |
kitty.app is not bundle based (it uses system python to run kitty), so that wont work for it, in this case you will be fine unless you either have a wrong kitty in PATH or you happen to launch kitty from inside kitty and there are incompatible changes, which is rare. launcher relies on system python to run kitty, linux-launcher works with the app bundle. In any case, I have fixed it not to care if executing the update check fails. |
Ok, so if I compile kitty from source with |
Yes, that is correct. Using the launcher script as the kitty binary |
When I tried to test the new notification feature, I got
ModuleNotFoundError: No module named 'kitty.update_check'
. This is because I started the newer kitty version from inside an older kitty version. When kitty starts, it looks inPATH
if there is a kitty executable already present. If so, it does not add anything new toPATH
. But sinceupdate_check.py
callsand
kitty
was still the old kitty version, I got the error because the old version didn't have that module yet.To reproduce (at least on macOS, didn't try on Linux):
git checkout 10f5461c
(just some commit before this module became available)make app
kitty.app
somewhere else, e.g. the Desktopkitty.app
on the Desktopcd
to the kitty git directorygit checkout master
make app
kitty.app/Contents/MacOS/kitty
This pull request removes the functionality to check if a kitty exe is already in the path.
main.py
has a checkif rpath and rpath not in items
that only addsrpath
toPATH
if it is not already present. Do you see any issues with this fix? This is still not fool proof since the correct kitty version could be later in the path than a different, wrong version but it seems very unlikely that this would happen by accident.