mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
feat: add GEMINI_CLI environment variable to spawned shell commands (#4791)
This commit is contained in:
@@ -514,4 +514,24 @@ describe('ShellTool Bug Reproduction', () => {
|
||||
undefined,
|
||||
);
|
||||
});
|
||||
|
||||
it('should pass GEMINI_CLI environment variable to executed commands', async () => {
|
||||
config = {
|
||||
getCoreTools: () => undefined,
|
||||
getExcludeTools: () => undefined,
|
||||
getDebugMode: () => false,
|
||||
getGeminiClient: () => ({}) as GeminiClient,
|
||||
getTargetDir: () => '.',
|
||||
getSummarizeToolOutputConfig: () => ({}),
|
||||
} as unknown as Config;
|
||||
shellTool = new ShellTool(config);
|
||||
|
||||
const abortSignal = new AbortController().signal;
|
||||
const result = await shellTool.execute(
|
||||
{ command: 'echo "$GEMINI_CLI"' },
|
||||
abortSignal,
|
||||
);
|
||||
|
||||
expect(result.returnDisplay).toBe('1\n');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user