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

rollback pipenv run behavior to before 2021.11.5 on Windows #4937

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/4935.behavior.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pattern expansion for arguments was disabled on Windows.
6 changes: 6 additions & 0 deletions pipenv/cli/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ def show_help(ctx, param, value):
help="Show this message and exit.",
)

def main(self, *args, **kwargs):
"""
to specify the windows_expand_args option to avoid exceptions on Windows
see: https://github.com/pallets/click/issues/1901
"""
return super().main(*args, **kwargs, windows_expand_args=False)

class State:
def __init__(self):
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,9 @@ def test_pipenv_outdated_prerelease(PipenvInstance):
f.write(contents)
c = p.pipenv('update --pre --outdated')
assert c.returncode == 0

@pytest.mark.cli
def test_pipenv_run_with_special_chars(PipenvInstance):
with PipenvInstance():
c = subprocess_run(["pipenv", "run", "echo", "[3-1]"])
assert c.returncode == 0, c.stderr