Skip to content

fix(bsk): escape every PowerShell single-quote character in the daemon task literals - #37

Merged
code-yeongyu merged 1 commit into
code-yeongyu:mainfrom
LilMGenius:fix/36-typographic-quotes
Oct 4, 2026
Merged

code-yeongyu merged 1 commit into
code-yeongyu:mainfrom
LilMGenius:fix/36-typographic-quotes

Conversation

@LilMGenius

@LilMGenius LilMGenius commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

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() in src/bsk/daemon-info.js doubled only ASCII ', so a home like O’Brien ended 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).

Input (Windows 11, bsk stand-in, node 26.10.0) main af8cfba this branch
test/bsk-daemon-start.test.mjs, home O’Brien fail: daemon never started (started.txt missing) pass
same, home ‘quoted‛ ‚ fail: same pass
existing Tom&Jerry (x) ^ ;, 100% %PATH% home, O'Brien cases pass pass
bun run test / bun run test:node 155 pass, 34 fail, 3 skip 157 pass, 34 fail, 3 skip

The 34 failures are the same names as on main and 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 in src/bsk/daemon-info.js only doubled the ASCII apostrophe, so a home like O’Brien ended 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.

Review in cubic

…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 code-yeongyu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@code-yeongyu
code-yeongyu merged commit df5540f into code-yeongyu:main Oct 4, 2026
3 checks passed
@LilMGenius
LilMGenius deleted the fix/36-typographic-quotes branch October 4, 2026 14:31
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.

bsk daemon task: PowerShell literal escapes only ASCII ' — typographic single quotes in a path break out

2 participants