[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: pyenv in Git bash don't expend arguments properly #189

Open
Celeborn2BeAlive opened this issue Nov 11, 2020 · 0 comments
Open

bug: pyenv in Git bash don't expend arguments properly #189

Celeborn2BeAlive opened this issue Nov 11, 2020 · 0 comments

Comments

@Celeborn2BeAlive
Copy link
Contributor

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:

  1. Create a script test.py with the following content;
import sys
print(sys.argv)
  1. Run python test.py "this should be one argument"
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant