Skip to content

Commit 03eddbe

Browse files
Tony363claude
andcommitted
fix: pipe prompt via stdin in nightly-docs-update workflow
The multi-line shell variable was not being passed correctly as a positional argument to claude-code --print, causing empty prompt errors. Use the same stdin piping pattern as issue-to-pr.yml. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9688574 commit 03eddbe

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/nightly-docs-update.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,16 @@ jobs:
173173
AFFECTED_DOCS: ${{ needs.detect-changes.outputs.affected_docs }}
174174
COMMITS: ${{ needs.detect-changes.outputs.commits_analyzed }}
175175
run: |
176-
PROMPT=$(cat .github/prompts/nightly-docs-update.md)
177-
178-
npx -y @anthropic-ai/claude-code \
176+
{
177+
cat .github/prompts/nightly-docs-update.md
178+
echo ""
179+
echo "AFFECTED_DOCS: ${AFFECTED_DOCS}"
180+
echo "COMMITS_TO_ANALYZE: ${COMMITS}"
181+
} | npx -y @anthropic-ai/claude-code \
179182
--print \
180183
--model claude-sonnet-4-6-v1 \
181184
--max-turns 40 \
182-
--allowedTools "Read,Edit,Glob,Grep,Bash(git log *),Bash(git diff *)" \
183-
"${PROMPT}
184-
185-
AFFECTED_DOCS: ${AFFECTED_DOCS}
186-
COMMITS_TO_ANALYZE: ${COMMITS}"
185+
--allowedTools "Read,Edit,Glob,Grep,Bash(git log *),Bash(git diff *)"
187186
188187
- name: Enforce file allowlist
189188
id: guardrails

0 commit comments

Comments
 (0)