Repository navigation
馃悰 fix(activation): escape PowerShell curly single quotes - #3325
Merged
Merged
Conversation
PowerShell treats U+2018-U+201B as single-quote delimiters just like the ASCII apostrophe, so a prompt, environment name or Tcl/Tk library path carrying one closed quote()'s literal early and ran the trailing text. Double each of those code points too, matching how PowerShell escapes a quote inside a single-quoted string.
gaborbernat
force-pushed
the
fix/powershell-curly-quote
branch
from
September 26, 2026 16:12
3629b4b to
b5a804d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PowerShell accepts the curly quotes U+2018鈥揢+201B as single-quote delimiters, and
PowerShellActivator.quote()doubled only the ASCII'. 馃悰 A prompt or Tcl/Tk library path holding one of them closed the literal inactivate.ps1and ran the rest as a command; this reproduces withpwsh7.6.quote()now doubles all five delimiters, the same escape PowerShell uses for'.