Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
Bug report
Given a non-python shebang line, e.g.#!/usr/bin/env bash,py.exe falls over with
❯ py ./x.pyUnable to create process using '/usr/bin/env bash ./x.py'py.exe should not be trying to interpret non-python shebang lines on Windows. Ifpy has been invoked (especially if manually invoked rather than implicitly by ftype association), the intent is to interpret the file as a python script.
I originally hit this withrust-lang/rust's x.py script, which is currently using/usr/bin/env bash to attempt to launch Python 3 across all OSes, whether they provide apython executable or justpython3. (MSYS makes this more fun, as itdoes directly interpret and use the shebang line, rather than calling theftype registered handler.)
Your environment
❯ winget list pythonName Id Version Available Source-------------------------------------------------------------------------------------Python 3 Python.Python.3 3.10.4150.0 3.10.5150.0 wingetPython Launcher {691AAAA1-FE86-4973-8DA2-6AA2B3327562} 3.10.7751.0Microsoft Windows
Version 21H2 (OS Build 22000.739)