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

Quote arguments with carets for cmd.exe #3320

Merged
merged 2 commits into from
Nov 29, 2018
Merged

Quote arguments with carets for cmd.exe #3320

merged 2 commits into from
Nov 29, 2018

Conversation

uranusjr
Copy link
Member

Carets introduce a difficult situation since they are essentially “lossy” when parsed. Consider this in cmd.exe:

> echo "foo^bar"
"foo^bar"
> echo foo^^bar
foo^bar

The two commands produce different results, but are both parsed by the shell as foo^bar, and there's essentially no sensible way to tell what was actually passed in. This implementation assumes the quoted variation (the first) since it is easier to implement, and arguably the more common case.

Fix #3307.

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

uranusjr and others added 2 commits November 28, 2018 19:30
Carets introduce a difficult situation since they are essentially
"lossy" when parses. Consider this in cmd.exe:

    > echo "foo^bar"
    "foo^bar"
    > echo foo^^bar
    foo^bar

The two commands produce different results, but are both parsed by the
shell as `foo^bar`, and there's essentially no sensible way to tell what
was actually passed in. This implementation assumes the quoted variation
(the first) since it is easier to implement, and arguably the more common
case.
@techalchemy
Copy link
Member

C:\Users\Dan.Ryan\git\tmp:> pipenv install -e svn+https://eu-subversion.assembla.com/svn/testuuu^testuuu-first-space/test_pyenv/trunk/test_package_1#egg=test-package
Creating a Pipfile for this project…
Installing -e svn+https://eu-subversion.assembla.com/svn/testuuu^testuuu-first-space/test_pyenv/trunk/test_package_1#egg=test-package…
Adding test-package to Pipfile's [packages]…
Installation Succeeded
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Success!
Updated Pipfile.lock (ac84d9)!
Installing dependencies from Pipfile.lock (ac84d9)…
  ================================ 2/2 - 00:00:03
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

🎉

@techalchemy techalchemy merged commit 67ea981 into master Nov 29, 2018
@techalchemy techalchemy deleted the quote-carets branch November 29, 2018 06:47
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

Successfully merging this pull request may close these issues.

Failed to install from SVN with caret character ^ in the path.
2 participants