Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python Launcher for Windows (py.exe) breaks on non-python shebang line #94399

Closed
Assignees
zooba
Labels
OS-windowstype-bugAn unexpected behavior, bug, or error
@CAD97

Description

@CAD97

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.0

Microsoft Windows
Version 21H2 (OS Build 22000.739)

Metadata

Metadata

Assignees

Labels

OS-windowstype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp