fix: preserve shell PATH for managed OpenCode

Restores shell-first PATH resolution for desktop-launched OpenCode
Keeps app PATH entries as fallback
Adds coverage for managed OpenCode PATH merging
This commit is contained in:
Bohdan Triapitsyn
2026-04-28 01:19:12 +03:00
parent 6f2ffdb2d6
commit ccab4f49df
3 changed files with 14 additions and 11 deletions
@@ -76,11 +76,6 @@ export const createServerUtilsRuntime = (dependencies) => {
const buildManagedOpenCodePath = () => {
const currentPath = process.env.PATH || '';
const loginShellPath = getLoginShellPath();
const home = os.homedir();
if (pathLooksUserConfigured(currentPath, home, path.delimiter)) {
return currentPath;
}
return mergePathValues(loginShellPath || '', currentPath, path.delimiter);
};