mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
Fix: Use CLAUDE_WORKING_DIR to correctly locate subagent files
The previous fix was looking in the wrong directory. Now uses CLAUDE_WORKING_DIR environment variable which points to the repository being processed, ensuring subagent files are found correctly.
This commit is contained in:
@@ -81,7 +81,9 @@ export async function setupClaudeCodeSettings(
|
||||
}
|
||||
|
||||
// Copy subagent files from repository to Claude's agents directory
|
||||
const repoAgentsDir = `${process.cwd()}/.claude/agents`;
|
||||
// CLAUDE_WORKING_DIR is set by the action to point to the repo being processed
|
||||
const workingDir = process.env.CLAUDE_WORKING_DIR || process.cwd();
|
||||
const repoAgentsDir = `${workingDir}/.claude/agents`;
|
||||
const targetAgentsDir = `${home}/.claude/agents`;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user