mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
Fix MCP server undefined error and file path resolution
- Add error field to MCP error responses to fix 'undefined' errors - Add REPO_DIR environment variable to fix file path resolution - Use GITHUB_WORKSPACE for correct repository directory - Simplify path processing logic in commit_files tool This fixes the issue where mcp__github_file_ops__commit_files would fail with 'Error calling tool commit_files: undefined' by ensuring error messages are properly formatted and files are read from the correct directory.
This commit is contained in:
@@ -34,6 +34,7 @@ export async function prepareMcpConfig(
|
||||
REPO_OWNER: owner,
|
||||
REPO_NAME: repo,
|
||||
BRANCH_NAME: branch,
|
||||
REPO_DIR: process.env.GITHUB_WORKSPACE || process.cwd(), // Use GitHub workspace directory
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user