Repository navigation
Conversation
PowerShell accepts U+2018 through U+201B as single-quote delimiters. Double them when constructing literal script paths and arguments, while preserving smart double quotes. Exercise the actual native launcher and check both argument contents and its child script exit code. Install-tier verification: full Go tests on macOS, Windows cross-build and go vet, Pester 6.2.0 native launcher cases with PowerShell 7.7.0 on macOS, and eight independent launcher-process round trips passed. The regression fails on the original implementation. Native Windows PowerShell 5.1, full Windows Pester and real-PC e2e remain unverified. Refs tw93#2021.
r266-tech
marked this pull request as ready for review
November 17, 2026 12:57
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.
The native
mo.exelauncher builds a single-quoted PowerShell command but only escapes ASCII apostrophes. An install path such asO’Brientherefore ends the script-path literal early; smart single quotes in arguments can also change the values received by the script.Escape U+2018, U+2019, U+201A and U+201B by doubling them, alongside ASCII apostrophes. Keep typographic double quotes unchanged: they are ordinary data inside this single-quoted literal. The generated
.cmdlauncher already uses-Fileand needs no change.The regression builds and executes the real native launcher from each quote-bearing directory, checks argument bytes through a base64-encoded JSON fixture, and checks the script's exit code. It failed for all four Unicode single quotes before the fix and passes afterwards. The Go regression also checks that double quotes remain unchanged.
Validation on macOS arm64 (Go 1.24.6, the repository toolchain; also checked with Go 1.27.4):
go test ./cmd/...passes.GOOS=windows go build ./cmd/...andGOOS=windows go vet ./cmd/...pass.GOOS=windowsand Go 1.24.6. Its importer cannot decode the host Go 1.27 export format, so that initial setup failure is retained separately.The incident ledger records #2021 and the new catchers against the fix commit. Its local audit passes with commit hashes shape-checked because the checkout is shallow.
Windows CI has now passed on head
7af8a516:No real-PC e2e, Scoop/winget installation or reporter-machine acceptance has been performed.
Refs #2021.