diff options
| author | Daniel Lee <[email protected]> | 2025-07-24 10:13:00 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-24 17:13:00 +0000 |
| commit | 3dd6e431df057af47b96990d0c9c6477ccfbe452 (patch) | |
| tree | 8a75c928b0c558d82a5470a504ff57f48002f801 /packages/core/src/tools/shell.ts | |
| parent | 52980510c92deb4af4c9012ae23bd67f169c1a32 (diff) | |
feat: add GEMINI_CLI environment variable to spawned shell commands (#4791)
Diffstat (limited to 'packages/core/src/tools/shell.ts')
| -rw-r--r-- | packages/core/src/tools/shell.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/core/src/tools/shell.ts b/packages/core/src/tools/shell.ts index af514546..44df5ece 100644 --- a/packages/core/src/tools/shell.ts +++ b/packages/core/src/tools/shell.ts @@ -322,11 +322,19 @@ Process Group PGID: Process group started or \`(none)\``, stdio: ['ignore', 'pipe', 'pipe'], // detached: true, // ensure subprocess starts its own process group (esp. in Linux) cwd: path.resolve(this.config.getTargetDir(), params.directory || ''), + env: { + ...process.env, + GEMINI_CLI: '1', + }, }) : spawn('bash', ['-c', command], { stdio: ['ignore', 'pipe', 'pipe'], detached: true, // ensure subprocess starts its own process group (esp. in Linux) cwd: path.resolve(this.config.getTargetDir(), params.directory || ''), + env: { + ...process.env, + GEMINI_CLI: '1', + }, }); let exited = false; |
