Skip to content

Escape paths w/single quotes before passing to powershell in sq strings #1411

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

Merged
merged 1 commit into from
Jul 10, 2018

Conversation

rkeithhill
Copy link
Contributor

@rkeithhill rkeithhill commented Jul 9, 2018

If the user's install path has a single quote in it e.g C:\Users\Night's Watch then the command line we supply to powershell fails to parse because we have a single quote inside of a single-quoted string e.g.:

powershell.exe -Command "& 'C:\Users\Night's Watch\.vscode\extenions...' …"

I believe this PR to be done but I'd like to see if it fixes the original issue for ajpaul18. Update: the fix was verified.

Fix #1404

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

@rjmholt
Copy link
Contributor

rjmholt commented Jul 9, 2018

I've tested start up on Linux with both /path/Robert's Foo/dir/ and /path/My "Foo"/dir/ and both work 👍

@rkeithhill rkeithhill changed the title WIP - Escape paths w/single quotes before passing to powershell in sq strings Escape paths w/single quotes before passing to powershell in sq strings Jul 9, 2018
@rjmholt
Copy link
Contributor

rjmholt commented Jul 9, 2018

Looks like the folding tests are failing — not sure how to fix that

@rkeithhill
Copy link
Contributor Author

See PR #1410.

@rkeithhill rkeithhill closed this Jul 10, 2018
@rkeithhill rkeithhill reopened this Jul 10, 2018
@rkeithhill rkeithhill merged commit 040c216 into master Jul 10, 2018
@rkeithhill rkeithhill deleted the rkeithhill/fix-pspath-with-single-quotes branch July 10, 2018 01:42
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.

terminal process exited with code:1
2 participants