fix shell path issue on mac

This commit is contained in:
Arjun 2026-05-06 13:02:01 +05:30
parent 72ed4bd6d9
commit 5e47bd4309
3 changed files with 18 additions and 6 deletions

View file

@ -112,7 +112,9 @@ function initializeExecutionEnvironment(): void {
).trim();
const env = JSON.parse(stdout) as Record<string, string>;
process.env = { ...env, ...process.env };
// Let the user's shell environment win for overlapping keys like PATH.
// Finder/launched GUI apps on macOS often start with a stripped PATH.
process.env = { ...process.env, ...env };
} catch (error) {
console.error('Failed to load shell environment', error);
}