-
Notifications
You must be signed in to change notification settings - Fork 13.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
Make x tool work with MS store's installed python #105786
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Have you confirmed this works? The way the Store does application links is frustratingly odd. It does not use symlinks, it uses a special Application Execution Alias that only works for |
I use this exact change now, and it works wonderfully. |
Oh hm, looking at the code, does this not just always return "python" unless a filesystem error occurs? Surely this breaks in the case where e.g. "python" does not exist but "python3" does? |
The old behavior was "find any file, directory or live symlink named |
I mean the new code is reading paths from the |
No, it will return |
Ah, the documentation is unfortunately confusing but that's not what it means. It will return |
I hope this works, but I just thought of another way to find which python to choose: try to call each of them with There is still the problem with the broken symlinks, but I think this is a small price to pay to make this even more universal. |
r? @jyn514 I seem to recall us having code like this (with --version) which caused dialogs to pop up for folks asking to install Python even though they already had one. But maybe I just dreamed that up :) |
I would like to avoid making major changes to the |
Mark-Simulacrum: @jyn514: |
@albertlarsan68 yes, I understand. I'm suggesting that we keep the x binary, but have it run the shell scripts instead of trying to find python in a fourth place. |
Well, I just have to do that then. |
PR is up at #105844 |
Thanks! |
This may introduce problems on other OSes where the python installation is broken, but this shouldn't happen.