anthropics / anthropics/claude-code-action

Broken CLAUDE_WORKING_DIR support

Aperta
#315 0 commenti 10 reazioni 0 assegnatari Vedi su GitHub
bug p1
Lingua principale
TypeScript
Stelle
8.9k
Fork
2.1k
Merge medio
3g 9h
PR unite (30g)
10

Descrizione

**Describe the bug**
The claude-code-action supports setting `CLAUDE_WORKING_DIR` to switch to a different directory before running claude. This is important for monorepos or repositories with nested CLAUDE.md files, to ensure the CI job picks up all the relevant context.

This worked by explicitly cd'ing to `$CLAUDE_WORKING_DIR` before running claude. This code still exists in the base action: https://github.com/anthropics/claude-code-action/blob/main/base-action/action.yml#L124-L128

However, after the changes in https://github.com/anthropics/claude-code-action/pull/285 the working directory is onl set in the "inner" action, but not when running the "outer" action, resulting in claude being run from the top-level directory always.

I believe the cd to `$CLAUDE_WORKING_DIR` should be moved from the base action to the outer action to fix this.

**Expected behavior**
Claude should run in `$CLAUDE_WORKING_DIR`

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.