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

More care with quoting to make PowerShell happy #2123

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

jennybc
Copy link
Member

@jennybc jennybc commented Jan 24, 2024

Addresses #2099

I was able to reproduce this and this PR rescues things for me.

The big idea is to provide the task's kibbles and bits individually and let VS Code figure out how to quote it, with stern instructions to use ShellQuoting.Strong:

Strong string quoting should be used. This for example uses " for Windows cmd and ' for bash and PowerShell. Strong quoting treats arguments as literal strings. Under PowerShell echo 'The value is $(2 * 3)' will print The value is $(2 * 3)

https://code.visualstudio.com/api/references/vscode-api#ShellQuoting

@jennybc
Copy link
Member Author

jennybc commented Jan 24, 2024

I'm tagging you @DavisVaughan because I think you're probably in the best position to experience this before and after, like me. But happy to get a review from anyone.

@jennybc jennybc merged commit 73499a1 into main Jan 25, 2024
1 check passed
@jennybc jennybc deleted the bugfix/powershell-quoting branch January 25, 2024 18:26
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.

2 participants