Skip to content

Fix invalid JSON in setup-repository placeholder substitution - #6

Merged
seclerp merged 1 commit into
mainfrom
fix/cookiecutter-json-escaping
May 31, 2026
Merged

seclerp merged 1 commit into
mainfrom
fix/cookiecutter-json-escaping

Conversation

@seclerp

@seclerp seclerp commented May 31, 2026

Copy link
Copy Markdown
Owner

The "Update placeholders in cookiecutter.json" step used sed to splice raw values into cookiecutter.json. Values containing ", \ or newlines (e.g. a repo description) produced invalid JSON and broke the cookiecutter scaffolding step.

Replace sed with jq, passing values via --arg so they are treated as data and serialized with proper JSON escaping.

The "Update placeholders in cookiecutter.json" step used `sed` to splice
raw values into cookiecutter.json. Values containing `"`, `\` or newlines
(e.g. a repo description) produced invalid JSON and broke the cookiecutter
scaffolding step.

Replace `sed` with `jq`, passing values via `--arg` so they are treated as
data and serialized with proper JSON escaping.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@seclerp
seclerp merged commit a7433d6 into main May 31, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant