Skip to content

Commit e070fb2

Browse files
JonZeollaclaude
andcommitted
fix: use cookiecutter zip download to bypass NTFS path restrictions
Double-quote characters in the template directory name are fundamentally illegal on NTFS — no git config can work around this. Use cookiecutter's zip URL support instead, which extracts via Python's zipfile module and avoids NTFS filesystem restrictions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 955fd5f commit e070fb2

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,21 +123,17 @@ jobs:
123123
env:
124124
RUN_POST_HOOK: 'true'
125125
SKIP_GIT_PUSH: 'true'
126-
TEMPLATE_BRANCH: ${{ github.head_ref || github.ref_name }}
127-
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'
126+
TEMPLATE_REF: ${{ github.event.pull_request.head.sha || github.sha }}
135127
run: |
136128
git config --global user.name "CI Automation"
137129
git config --global user.email "ci@zenable.io"
138130
139-
# Cookiecutter fetches the template from the remote branch.
140-
uvx --with gitpython cookiecutter "gh:$env:TEMPLATE_REPO" --checkout "$env:TEMPLATE_BRANCH" --no-input --output-dir "$env:RUNNER_TEMP"
131+
# The template directory name contains double-quote characters which
132+
# are fundamentally illegal on NTFS — git clone cannot work. Use
133+
# cookiecutter's zip download support instead, which extracts via
134+
# Python's zipfile module and avoids NTFS path restrictions.
135+
$zipUrl = "https://github.com/${{ github.repository }}/archive/$env:TEMPLATE_REF.zip"
136+
uvx --with gitpython cookiecutter "$zipUrl" --no-input --output-dir "$env:RUNNER_TEMP"
141137
- name: Verify generated project
142138
shell: pwsh
143139
run: |

0 commit comments

Comments
 (0)