Bug
sh1pt init currently derives the prompt's default project name with:
process.cwd().split('/').pop()
That works for POSIX-style paths, but on Windows process.cwd() uses backslashes. In a directory like C:\Users\alice\projects\my-app, the init prompt can default to the whole path instead of my-app.
Repro
Run sh1pt init from a Windows project directory and inspect the default value in the Project name prompt.
Expected
The default project name should be the basename of the current directory on both POSIX and Windows paths.
Proposed fix
Use a small path-normalizing helper for the init default name and cover both POSIX and Windows-style paths in a focused CLI test.
Bug
sh1pt initcurrently derives the prompt's default project name with:That works for POSIX-style paths, but on Windows
process.cwd()uses backslashes. In a directory likeC:\Users\alice\projects\my-app, the init prompt can default to the whole path instead ofmy-app.Repro
Run
sh1pt initfrom a Windows project directory and inspect the default value in theProject nameprompt.Expected
The default project name should be the basename of the current directory on both POSIX and Windows paths.
Proposed fix
Use a small path-normalizing helper for the init default name and cover both POSIX and Windows-style paths in a focused CLI test.