fix(platform): make template directory NTFS-safe for Windows#92
Merged
fix(platform): make template directory NTFS-safe for Windows#92
Conversation
The template directory name `{{cookiecutter.project_name|replace(" ", "")}}`
contained pipe (`|`) and double-quote (`"`) characters which are illegal on
NTFS. This prevented Windows users from cloning the repo via
`cookiecutter gh:zenable-io/ai-native-python`.
Rename to `{{cookiecutter.project_name}}` and add pre-gen hook validation
to reject spaces in project names (use hyphens instead). This eliminates
the need for the extract_template_zip.py workaround and lets Windows CI
do a normal checkout.
Also adds Windows install instructions (winget) to README and guards
`brew upgrade` commands with OS checks in Taskfiles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Nice work! 😎
I didn't find anything of concern
Did you know we can integrate this feedback directly into 50+ IDEs? Get setup in just one command
Use `gh:` syntax in Windows CI to match the exact README command. Pass github.head_ref through env var to satisfy actionlint. Disable lint/test jobs while iterating on Windows support. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cookiecutter's gh: syntax does git clone of the default branch first, which fails on Windows when main still has NTFS-illegal paths. Pre-clone with --no-checkout and checkout the PR branch to seed the cache. The actual cookiecutter command remains the same as the README. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cookiecutter's gh: syntax clones the default branch first. When main still has NTFS-illegal paths, this fails on Windows. Setting core.protectNTFS=false lets git skip path validation so the clone can succeed, then cookiecutter checks out the PR branch which has valid paths. This setting becomes a no-op after the PR merges. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The gh: command tries to clone main first which fails on Windows when main still has NTFS-illegal paths. Add a fallback that manually clones with --no-checkout and checks out the PR branch. After merge, the gh: command succeeds directly and the fallback is never triggered. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Windows smoke test passes with the gh: command (using local clone fallback pre-merge). Re-enable all Linux CI jobs. Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
{{cookiecutter.project_name|replace(" ", "")}}to{{cookiecutter.project_name}}— the pipe (|) and double-quote (") characters in the Jinja2 filter were illegal on NTFS, preventinggit cloneon Windows entirelyreplace(" ", "")filter that previously handled spaces is goneactions/checkoutinstead of theextract_template_zip.pyworkaround (now deleted)winget install astral-sh.uv Task.Task) to READMEbrew upgrade uvwith OS check (ne OS "windows") in both root and template TaskfilesTest plan
uvx --with gitpython cookiecutter gh:zenable-io/ai-native-pythoncommand works on Windows after merge🤖 Generated with Claude Code