Skip to content

Commit 8127aa0

Browse files
authored
patch_shebang_line() match double quote after python.exe, outside of capture group
1 parent bc8dc44 commit 8127aa0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎winpython/utils.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,15 +369,15 @@ def patch_shebang_line(
369369
executable = sys.executable
370370
if sys.version_info[0] == 2:
371371
shebang_line = re.compile(
372-
r"(#!.*pythonw?\.exe)"
372+
r"(#!.*pythonw?\.exe)\"?"
373373
) # Python2.7
374374
else:
375375
shebang_line = re.compile(
376-
b"(#!.*pythonw?\.exe)"
376+
b"(#!.*pythonw?\.exe)\"?"
377377
) # Python3+
378378
if 'pypy3' in sys.executable:
379379
shebang_line = re.compile(
380-
b"(#!.*pypy3w?\.exe)"
380+
b"(#!.*pypy3w?\.exe)\"?"
381381
) # Pypy3+
382382

383383
target_dir = target_dir.encode('utf-8')

0 commit comments

Comments
 (0)