From 3dd6e431df057af47b96990d0c9c6477ccfbe452 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Thu, 24 Jul 2025 10:13:00 -0700 Subject: feat: add GEMINI_CLI environment variable to spawned shell commands (#4791) --- packages/cli/src/ui/hooks/shellCommandProcessor.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'packages/cli/src/ui/hooks/shellCommandProcessor.ts') diff --git a/packages/cli/src/ui/hooks/shellCommandProcessor.ts b/packages/cli/src/ui/hooks/shellCommandProcessor.ts index 5d2b3166..9e343f90 100644 --- a/packages/cli/src/ui/hooks/shellCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/shellCommandProcessor.ts @@ -72,6 +72,10 @@ function executeShellCommand( cwd, stdio: ['ignore', 'pipe', 'pipe'], detached: !isWindows, // Use process groups on non-Windows for robust killing + env: { + ...process.env, + GEMINI_CLI: '1', + }, }); // Use decoders to handle multi-byte characters safely (for streaming output). -- cgit v1.2.3