Repository navigation
fix(windows): quote Expand-Archive fallback paths that contain apostrophes - #2031
Merged
Chadpiha merged 1 commit intoSep 16, 2026
Merged
Conversation
…ophes Co-authored-by: Cursor <[email protected]>
Chadpiha
approved these changes
Sep 16, 2026
Chadpiha
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the extraction fallback and traced its callers through the GPU download/install flows. Escaping both paths and using -LiteralPath addresses the reported apostrophe-path failure while preserving tar-first behavior and existing extraction routes. No blocking findings.
Thanks @stantheman0128 !
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.
Windows zip extract tries
tarfirst, then PowerShellExpand-Archive. The fallback still interpolates-Path '${zipPath}'. An apostrophe in the profile path closes that string early, so Expand-Archive looks for a drive namedBrien-...and GPU/binary install fails (gpuBinaryManageruses this helper).This keeps
taras the primary path. The fallback now uses-LiteralPathand doubles apostrophes inside the single-quoted command.Fixes #2030
Test plan
node --import tsx --test test/helpers/extractArchive.test.json Win11O'Brien(O''Brienin the-Command)%TEMP%\O'Brien-extract-*with tar forced to failnpm test(the live apostrophe extract is skipped there)Evidence
HEAD command against
C:\Users\stans\AppData\Local\Temp\O'Brien-ow-extract\binary.zip:Same zip with
-LiteralPathand doubled':After the helper change, the Windows live test extracted
hello from test. 6 passed in that file; the remaining fail is the Linux unzip corrupt-zip case (pre-existing on Win32, CI is ubuntu).AI assistance
Drafted with Cursor. I reproduced the fallback on this Win11 box and wrote the quoting change plus tests.