You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e5f9054
Browse filesBrowse the repository at this point in the historyBrowse files
fix(service): verify a scheduler path the console code page cannot carry
A Windows profile directory outside the console code page made
verifyWindowsSchedulerInstall reject a valid task and roll back a successful
elevated create: windowsTaskRegistrationHealthy compares Command and
Arguments against the local paths, and the value schtasks reported no longer
equalled them.
The reported cause -- that runFile() applies a code-page conversion the raw
bytes would avoid -- is not where it happens. runFile already reads with
encoding: "buffer", and under Bun on Windows execFileSync and Bun.spawnSync
return byte-identical output; I measured both against a UTF-16LE fixture.
The conversion is schtasks' own: with stdout redirected, `/query /tn X /xml`
emits console-code-page bytes, not the UTF-16LE the decoder documents. On
this machine the document starts `3c 3f 78 6d 6c` -- `<?xml`, no BOM. So
the characters are already gone before any decoder runs, and switching spawn
APIs cannot recover them.
Compare those two values as paths instead. The expected path is matched
literally except across a run the code page could not carry, where anything
is accepted -- "?" per character, U+FFFD, or nothing -- but never a path
separator, so every directory the path names is still verified and a task
pointing somewhere else still fails. An all-ASCII path is unaffected: there
is nothing unrepresentable in it, so the comparison stays exact.
Fixes#3064
0 commit comments