Skip to content

Commit 7fc8035

Browse files
gilesknapclaude
andcommitted
fix(template): drop trailing blank from rendered postCreate.sh
Jinja's default settings keep the newline after `{% endif %}`, so the rendered postCreate.sh ended with `bash\n\n` (a trailing blank line). end-of-file-fixer in pre-commit flagged this, breaking lint/run and all `test_template_*` jobs that exercise the generated project. `{% endif -%}` strips the trailing newline; removing the blank source line above `{% if %}` keeps the spacing tidy when add_claude is false. Also normalises the meta repo's own .devcontainer/postCreate.sh to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 944ba53 commit 7fc8035

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

.devcontainer/postCreate.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,5 @@ if [ -f .gitmodules ]; then
4747
[ -n "$missing" ] && git submodule update --init $missing
4848
fi
4949

50-
5150
# Install Claude Code CLI
5251
curl -fsSL https://claude.ai/install.sh | bash
53-

template/.devcontainer/postCreate.sh.jinja

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ if [ -f .gitmodules ]; then
4646
missing=$(git submodule status | awk '/^-/ {print $2}')
4747
[ -n "$missing" ] && git submodule update --init $missing
4848
fi
49-
5049
{% if add_claude %}
5150
# Install Claude Code CLI
5251
curl -fsSL https://claude.ai/install.sh | bash
53-
{% endif %}
52+
{% endif -%}

0 commit comments

Comments
 (0)