Repository navigation
fix(cli): init no longer crashes copying into a folder at a Windows drive root - #7220
Merged
Merged
Conversation
Contributor
Contributor
There was a problem hiding this comment.
Approving at 7e22db77. I found no blocker.
What I checked
- Fails-without-the-fix line: the Test plan bullet carries it. It names the test (
copyDir.test.ts, "copies into an existing folder directly under a drive root") and the failure on windows-latest with the oldcopyDirSync("Worker exited unexpectedly"). I can't run Windows from here, so I'm relying on the body's windows-latest evidence for that half. - CI at this head is all green. The Windows engine-cli job ran both new tests and both passed ✓, including
copies into an existing folder directly under a drive root. - Linux local run passes:
copyDir,skillsMirrorand allinit*tests (114 passed, 2 skipped as Windows-only). - Callers:
initmakesdestDirand then merges the template into it.copyFileSyncoverwrites the same waycpSync's defaultforcedid, and existing user files are kept; the new test covers that.skillsMirror.linkOrCopyrunsrmSyncon the target first, so the copy always lands in an empty folder. - Symlinks: there are none under the templates or the skills, so the change in symlink handling doesn't affect today's inputs.
Non-blocking
- If the destination already has an entry with the same name,
symlinkSyncthrowsEEXIST, wherecpSyncused to replace it. No caller hits this today. - A relative symlink is now copied exactly as written.
cpSync(withverbatimSymlinks: false) rewrote it to an absolute path, so a relative link that points outside the copied tree would now break. - Both are worth a line in the doc comment if a symlinked template ever shows up.
SanHsien
added a commit
to SanHsien/hyperframes
that referenced
this pull request
Nov 6, 2026
…eview Adopts or partially adopts 8 groups: capture-failure diagnostics and frame-capture retry in engine, ffprobe fixes, renderOrchestrator updates, studio-server render/files/source-mutation routes, CLI screenshot retry and init/snapshot/timeline fixes, and the motion-blur land-then-undo path (fork seek recovery kept). Left out with ledger reasons: heygen-com#7211 render diagnostic CLI, heygen-com#7089 reverse start; heygen-com#7220 deferred. Core packed budget grows by the measured 1065 bytes since upstream heygen-com#7191 changed no budget. Watermark advances to 659ef56. Co-authored-by: Miguel Ángel <miguel.sierra@heygen.com> Co-authored-by: WaterrrForever <miao.yang@heygen.com> Co-authored-by: Vance Ingalls <vance@heygen.com> Co-authored-by: James Russo <james.russo@heygen.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
hyperframes initinto a folder directly under a Windows drive root (init D:\my-video) no longer crashes. It used to end with exit code -1073740791 (0xC0000409) and write no project files. The same command with the target one folder deeper, or on asubstdrive, worked.Why
Users on Windows reported it, with the workaround "init on C: then move". Init makes the project folder first and then copies the template into it. Node's
fs.cpSynckills the process when its destination is a folder that already exists directly under a drive root, with or without afilter. That holds on C:, D: and an attached virtual disk alike, and with NTFS, ReFS, exFAT and FAT32. A destination that does not exist yet, or one a level deeper, copies fine.Related work
None open.
copyDirSyncpassed afilterto keep Node off its native copy, which wrote nothing under a non-ASCII path on Windows (init.nonAsciiPath.test.ts). A filteredcpSyncstill runs into the same crash.How
copyDirSync, the CLI's one directory copy (init's template and the skills mirror), copies withreaddirSync,mkdirSyncandcopyFileSync, merging into what is there and keeping symlinks as symlinks. It no longer callsfs.cpSync. Its options parameter had no caller and is gone.compare.tsand the media-use recipe store still callcpSync, into temp folders and the user's~/.hyperframes, never a drive root. They are left alone.Test plan
copyDir.test.tscopies a tree with non-ASCII names into a folder that already holds files. On Windows only, it also copies into an existing folder directly under the temp folder's drive root. That case fails without the fix: on windows-latest, with the oldcopyDirSync, the Vitest worker dies ("Worker exited unexpectedly").init C:\hfroot-…andinit D:\hfroot-…into existing root folders exit 0xC0000409 with no files. This branch's CLI exits 0 with the six project files in each.copyDir,init,init.nonAsciiPathandskillsMirrortests pass on windows-latest. oxfmt and oxlint pass on the changed files.copyDirSync's comment says why it does not usefs.cpSyncand which destination crashes it.Not exercised: Node 24 directly. The same crash was reported from an app that runs the CLI on Node 24.
Size
About 60 lines: one helper and its test. A lone fix for a crash no open PR touches, so nothing can carry it.