Skip to content

fix: create-project writes inside the chosen directory on Windows - #309

Open
tonycoder-hub wants to merge 2 commits into
ohosvscode:nextfrom
tonycoder-hub:cursor/fix-create-project-path-a37c
Open

fix: create-project writes inside the chosen directory on Windows#309
tonycoder-hub wants to merge 2 commits into
ohosvscode:nextfrom
tonycoder-hub:cursor/fix-create-project-path-a37c

Conversation

@tonycoder-hub

Copy link
Copy Markdown

Fixes issue 219.
On Windows, Handlebars escaped the template path so the new module was written as a sibling of the chosen directory.
The fix compiles only the path relative to the template root, then resolves it against the save directory.
lint passed

cursoragent and others added 2 commits August 17, 2026 20:25
Handlebars treats \{{ as an escaped literal, so compiling a Windows
fsPath turned empty-ability\{{moduleName}} into a sibling folder
named empty-ability{{moduleName}}. Compile the relative POSIX path
instead so the module lands inside the chosen save path.

Fixes ohosvscode#219

Co-authored-by: Tony Coder <407243179@qq.com>
The vite-plus test runner polyfills node:path without win32, so assert
the compiled relative path and the Handlebars \\{{ escape directly.

Co-authored-by: Tony Coder <407243179@qq.com>
@changeset-bot

changeset-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6c449d8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vscode-naily-ets Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

2 participants