Skip to content

Commit 955fd5f

Browse files
JonZeollaclaude
andcommitted
fix: inject core.protectNTFS via GIT_CONFIG env vars
Cookiecutter internally runs git clone, which also fails on NTFS due to the template directory name containing quote characters. Use GIT_CONFIG_COUNT/KEY/VALUE environment variables to inject core.protectNTFS=false into all git invocations without needing a config file or HOME directory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 05bd404 commit 955fd5f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,18 @@ jobs:
125125
SKIP_GIT_PUSH: 'true'
126126
TEMPLATE_BRANCH: ${{ github.head_ref || github.ref_name }}
127127
TEMPLATE_REPO: ${{ github.repository }}
128+
# The template directory name contains quotes which are illegal on NTFS.
129+
# GIT_CONFIG_COUNT/KEY/VALUE injects core.protectNTFS=false into every
130+
# git invocation (including cookiecutter's internal git clone) without
131+
# needing a config file.
132+
GIT_CONFIG_COUNT: '1'
133+
GIT_CONFIG_KEY_0: core.protectNTFS
134+
GIT_CONFIG_VALUE_0: 'false'
128135
run: |
129-
# Configure git identity for the post-gen commit
130136
git config --global user.name "CI Automation"
131137
git config --global user.email "ci@zenable.io"
132138
133139
# Cookiecutter fetches the template from the remote branch.
134-
# This avoids checking out the repo locally, which is impossible on
135-
# Windows due to illegal NTFS characters in the template directory name.
136140
uvx --with gitpython cookiecutter "gh:$env:TEMPLATE_REPO" --checkout "$env:TEMPLATE_BRANCH" --no-input --output-dir "$env:RUNNER_TEMP"
137141
- name: Verify generated project
138142
shell: pwsh

0 commit comments

Comments
 (0)