fix(bsk): escape every PowerShell single-quote character in the daemon task literals - #37
Merged
code-yeongyu merged 1 commit intoOct 4, 2026
Conversation
…n task literals PowerShell treats U+2018, U+2019, U+201A and U+201B as single quotes too, and literal() doubled only the ASCII one, so a home such as O’Brien closed the literal early and the daemon task never started. Each of those characters is now doubled with itself. The Windows test gains homes named O’Brien and ‘quoted‛ ‚. Fixes code-yeongyu#36
code-yeongyu
approved these changes
Oct 4, 2026
code-yeongyu
left a comment
Owner
There was a problem hiding this comment.
Exactly the fix: every character PowerShell treats as a single quote is doubled with itself, and O’Brien plus a ‘ ‛ ‚ home now start the daemon with that exact home, failing on main and passing here. Approving; I'll merge on green CI. Thanks for the fast turnaround.
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.
Fixes #36. PowerShell's tokenizer treats U+2018, U+2019, U+201A and U+201B as single quotes, both to close a single-quoted string and as its doubled escape.
literal()insrc/bsk/daemon-info.jsdoubled only ASCII', so a home likeO’Brienended the literal early and the scheduled daemon task never started.The fix doubles each of the four characters with itself, as the issue proposes:
value.replace(/['\u2018\u2019\u201A\u201B]/g, (q) => q + q).mainaf8cfbatest/bsk-daemon-start.test.mjs, homeO’Brienstarted.txtmissing)‘quoted‛ ‚Tom&Jerry (x) ^ ;,100% %PATH% home,O'Briencasesbun run test/bun run test:nodeThe 34 failures are the same names as on
mainand unrelated. The test is Windows-only and skipped by the Linux CI job.Summary by cubic
Fixes the PowerShell daemon task never starting when a home path contains Unicode single-quote characters U+2018, U+2019, U+201A, and U+201B, which PowerShell treats as quote delimiters. The
literal()helper insrc/bsk/daemon-info.jsonly doubled the ASCII apostrophe, so a home likeO’Brienended the literal early and the daemon task never started. Each of those characters is now escaped by doubling it with itself.Adds Windows-only test cases for homes with these characters. The suite passes aside from 34 pre-existing failures also present on
main; the test is skipped on the Linux CI job.Written for commit 45d1ed4. Summary will update on new commits.