You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I pass quoted arguments to python or pyenv, they are expended as multiple arguments in the final executable called (python.exe in general).
To Reproduce
Steps to reproduce the behavior:
Create a script test.py with the following content;
import sys
print(sys.argv)
Run python test.py "this should be one argument"
See ['test.py', 'this', 'should', 'be', 'one', 'argument'] displayed instead of ['test.py', 'this should be one argument']
Expected behavior
pyenv should forward quoted arguments correctly.
Solution
After investigation, I think it is due to $* being used in pyenv and python (in shims) scripts to forward arguments. Replacing it with "$@" solves the problem in my case.
Desktop (please complete the following information):
OS: Windows 10
Tools used: Git bash
Version: 2.64.3
Additional context
This behavior occured recently on my python setup, and I really don't understand what I changed to make it appear... Maybe a git bash update, or a change in my configuration. A few days ago everything was working fine.
The text was updated successfully, but these errors were encountered:
Describe the bug
When I pass quoted arguments to
python
orpyenv
, they are expended as multiple arguments in the final executable called (python.exe in general).To Reproduce
Steps to reproduce the behavior:
test.py
with the following content;python test.py "this should be one argument"
['test.py', 'this', 'should', 'be', 'one', 'argument']
displayed instead of['test.py', 'this should be one argument']
Expected behavior
pyenv should forward quoted arguments correctly.
Solution
After investigation, I think it is due to
$*
being used inpyenv
andpython
(in shims) scripts to forward arguments. Replacing it with"$@"
solves the problem in my case.Desktop (please complete the following information):
Additional context
This behavior occured recently on my python setup, and I really don't understand what I changed to make it appear... Maybe a git bash update, or a change in my configuration. A few days ago everything was working fine.
The text was updated successfully, but these errors were encountered: