authorgravatar for 132888838+arhxam@users.noreply.github.comArham Amin <132888838+arhxam@users.noreply.github.com> 2026-08-10 03:15:08+05:30
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-08-09 14:45:08-07:00
logc8ad4b8135dca79c439a44845d270f12c355cfe2
treeabbf3d8e8c44d0e3b3139458f1283fb060c64230
parentbd18d8d6d1feb23dd05dc357e34e353547a51d40
signature Signed by PGP key B5690EEEBB952194

fix(shell): add ~/.local/bin to the Windows CLI resolver so native-installed providers are found (#5074)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

4 files changed, 9 insertions(+), 2 deletions(-)

apps/desktop/src/shell/DesktopShellEnvironment.test.ts+1
...@@ -231,6 +231,7 @@ describe("DesktopShellEnvironment", () => {...@@ -231,6 +231,7 @@ describe("DesktopShellEnvironment", () => {
231 "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",231 "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",
232 "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",232 "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",
233 "C:\\Users\\testuser\\AppData\\Local\\pnpm",233 "C:\\Users\\testuser\\AppData\\Local\\pnpm",
234 "C:\\Users\\testuser\\.local\\bin",
234 "C:\\Users\\testuser\\.bun\\bin",235 "C:\\Users\\testuser\\.bun\\bin",
235 "C:\\Users\\testuser\\scoop\\shims",236 "C:\\Users\\testuser\\scoop\\shims",
236 "C:\\Custom\\Bin",237 "C:\\Custom\\Bin",
apps/desktop/src/shell/DesktopShellEnvironment.ts+1-1
...@@ -207,7 +207,7 @@ const knownWindowsCliDirs = (env: NodeJS.ProcessEnv): ReadonlyArray<string> => [...@@ -207,7 +207,7 @@ const knownWindowsCliDirs = (env: NodeJS.ProcessEnv): ReadonlyArray<string> => [
207 ...trimNonEmpty(env.USERPROFILE).pipe(207 ...trimNonEmpty(env.USERPROFILE).pipe(
208 Option.match({208 Option.match({
209 onNone: () => [],209 onNone: () => [],
210 onSome: (value) => [`${value}\\.bun\\bin`, `${value}\\scoop\\shims`],210 onSome: (value) => [`${value}\\.local\\bin`, `${value}\\.bun\\bin`, `${value}\\scoop\\shims`],
211 }),211 }),
212 ),212 ),
213];213];
packages/shared/src/shell.test.ts+4
...@@ -336,6 +336,7 @@ describe("resolveKnownWindowsCliDirs", () => {...@@ -336,6 +336,7 @@ describe("resolveKnownWindowsCliDirs", () => {
336 "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",336 "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",
337 "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",337 "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",
338 "C:\\Users\\testuser\\AppData\\Local\\pnpm",338 "C:\\Users\\testuser\\AppData\\Local\\pnpm",
339 "C:\\Users\\testuser\\.local\\bin",
339 "C:\\Users\\testuser\\.bun\\bin",340 "C:\\Users\\testuser\\.bun\\bin",
340 "C:\\Users\\testuser\\scoop\\shims",341 "C:\\Users\\testuser\\scoop\\shims",
341 ]);342 ]);
...@@ -476,6 +477,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => {...@@ -476,6 +477,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => {
476 "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",477 "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",
477 "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",478 "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",
478 "C:\\Users\\testuser\\AppData\\Local\\pnpm",479 "C:\\Users\\testuser\\AppData\\Local\\pnpm",
480 "C:\\Users\\testuser\\.local\\bin",
479 "C:\\Users\\testuser\\.bun\\bin",481 "C:\\Users\\testuser\\.bun\\bin",
480 "C:\\Users\\testuser\\scoop\\shims",482 "C:\\Users\\testuser\\scoop\\shims",
481 "C:\\Shell\\Bin",483 "C:\\Shell\\Bin",
...@@ -524,6 +526,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => {...@@ -524,6 +526,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => {
524 "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",526 "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",
525 "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",527 "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",
526 "C:\\Users\\testuser\\AppData\\Local\\pnpm",528 "C:\\Users\\testuser\\AppData\\Local\\pnpm",
529 "C:\\Users\\testuser\\.local\\bin",
527 "C:\\Users\\testuser\\.bun\\bin",530 "C:\\Users\\testuser\\.bun\\bin",
528 "C:\\Users\\testuser\\scoop\\shims",531 "C:\\Users\\testuser\\scoop\\shims",
529 "C:\\Shell\\Bin",532 "C:\\Shell\\Bin",
...@@ -564,6 +567,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => {...@@ -564,6 +567,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => {
564 ).toEqual({567 ).toEqual({
565 PATH: [568 PATH: [
566 "C:\\Users\\testuser\\AppData\\Roaming\\npm",569 "C:\\Users\\testuser\\AppData\\Roaming\\npm",
570 "C:\\Users\\testuser\\.local\\bin",
567 "C:\\Users\\testuser\\.bun\\bin",571 "C:\\Users\\testuser\\.bun\\bin",
568 "C:\\Users\\testuser\\scoop\\shims",572 "C:\\Users\\testuser\\scoop\\shims",
569 "C:\\Windows\\System32",573 "C:\\Windows\\System32",
packages/shared/src/shell.ts+3-1
...@@ -682,7 +682,9 @@ export function resolveKnownWindowsCliDirs(env: NodeJS.ProcessEnv): ReadonlyArra...@@ -682,7 +682,9 @@ export function resolveKnownWindowsCliDirs(env: NodeJS.ProcessEnv): ReadonlyArra
682 ...(appData ? [`${appData}\\npm`] : []),682 ...(appData ? [`${appData}\\npm`] : []),
683 ...(localAppData ? [`${localAppData}\\Programs\\nodejs`, `${localAppData}\\Volta\\bin`] : []),683 ...(localAppData ? [`${localAppData}\\Programs\\nodejs`, `${localAppData}\\Volta\\bin`] : []),
684 ...(localAppData ? [`${localAppData}\\pnpm`] : []),684 ...(localAppData ? [`${localAppData}\\pnpm`] : []),
685 ...(userProfile ? [`${userProfile}\\.bun\\bin`, `${userProfile}\\scoop\\shims`] : []),685 ...(userProfile
686 ? [`${userProfile}\\.local\\bin`, `${userProfile}\\.bun\\bin`, `${userProfile}\\scoop\\shims`]
687 : []),
686 ];688 ];
687}689}
688690