Make x tool work with MS store's installed python#105786
Make x tool work with MS store's installed python#105786albertlarsan68 wants to merge 3 commits into
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.