diff --git a/src/main/services/mcp/shell-env.ts b/src/main/services/mcp/shell-env.ts index 9901417024..a4128b3651 100644 --- a/src/main/services/mcp/shell-env.ts +++ b/src/main/services/mcp/shell-env.ts @@ -85,7 +85,7 @@ function getLoginShellEnvironment(): Promise> { Logger.warn(`Shell process stderr output (even with exit code 0):\n${errorOutput.trim()}`) } - const env = {} + const env: Record = {} const lines = output.split('\n') lines.forEach((line) => { @@ -110,6 +110,8 @@ function getLoginShellEnvironment(): Promise> { Logger.warn('Raw output from shell:\n', output) } + env.PATH = env.Path || env.PATH || '' + resolve(env) }) })