mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-08-22 03:18:54 +08:00
fix: strip unused ALL_INPUTS environment variable from Claude subprocess env (#1692)
This commit is contained in:
@@ -620,5 +620,22 @@ describe("parseSdkOptions", () => {
|
||||
process.env = originalEnv;
|
||||
}
|
||||
});
|
||||
|
||||
test("should strip ALL_INPUTS from env", () => {
|
||||
const originalEnv = { ...process.env };
|
||||
process.env.ALL_INPUTS = JSON.stringify({
|
||||
anthropic_api_key: "sk-ant-test-key",
|
||||
github_token: "ghp_test_token",
|
||||
});
|
||||
|
||||
try {
|
||||
const options: ClaudeOptions = {};
|
||||
const result = parseSdkOptions(options);
|
||||
|
||||
expect(result.sdkOptions.env?.ALL_INPUTS).toBeUndefined();
|
||||
} finally {
|
||||
process.env = originalEnv;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user