Skip to content

Commit 4095f00

Browse files
JonZeollaclaude
andcommitted
ci: use core.protectNTFS=false to allow gh: clone on Windows
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>
1 parent 6ce4ffa commit 4095f00

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,10 @@ jobs:
129129
git config --global user.name "CI Automation"
130130
git config --global user.email "ci@zenable.io"
131131
132-
# Pre-populate cookiecutter's cache so the gh: command doesn't need to
133-
# clone main (which may still have NTFS-illegal paths before this PR merges).
134-
# After merge, this is a no-op since the cache will already be valid.
135-
repo_name=$(basename "${TEMPLATE_REPO}")
136-
cache_dir="$HOME/.cookiecutters/${repo_name}"
137-
if [[ ! -d "$cache_dir" ]]; then
138-
git clone --no-checkout "https://github.com/${TEMPLATE_REPO}.git" "$cache_dir"
139-
git -C "$cache_dir" checkout "${TEMPLATE_REF}"
140-
fi
132+
# Allow git to clone repos with NTFS-illegal paths (e.g. pipes/quotes in
133+
# the old template directory name on main). After this PR merges, the
134+
# illegal paths are gone and this setting becomes a no-op.
135+
git config --global core.protectNTFS false
141136
142137
# Same command as README, plus --checkout for the PR branch and --no-input for CI
143138
uvx --with gitpython cookiecutter \

0 commit comments

Comments
 (0)