Skip to content

Commit c8ad4b8

Browse files
arhxamclaude
andauthored
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>
1 parent bd18d8d commit c8ad4b8

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

apps/desktop/src/shell/DesktopShellEnvironment.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ describe("DesktopShellEnvironment", () => {
231231
"C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",
232232
"C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",
233233
"C:\\Users\\testuser\\AppData\\Local\\pnpm",
234+
"C:\\Users\\testuser\\.local\\bin",
234235
"C:\\Users\\testuser\\.bun\\bin",
235236
"C:\\Users\\testuser\\scoop\\shims",
236237
"C:\\Custom\\Bin",

apps/desktop/src/shell/DesktopShellEnvironment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ const knownWindowsCliDirs = (env: NodeJS.ProcessEnv): ReadonlyArray<string> => [
207207
...trimNonEmpty(env.USERPROFILE).pipe(
208208
Option.match({
209209
onNone: () => [],
210-
onSome: (value) => [`${value}\\.bun\\bin`, `${value}\\scoop\\shims`],
210+
onSome: (value) => [`${value}\\.local\\bin`, `${value}\\.bun\\bin`, `${value}\\scoop\\shims`],
211211
}),
212212
),
213213
];

packages/shared/src/shell.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ describe("resolveKnownWindowsCliDirs", () => {
336336
"C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",
337337
"C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",
338338
"C:\\Users\\testuser\\AppData\\Local\\pnpm",
339+
"C:\\Users\\testuser\\.local\\bin",
339340
"C:\\Users\\testuser\\.bun\\bin",
340341
"C:\\Users\\testuser\\scoop\\shims",
341342
]);
@@ -476,6 +477,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => {
476477
"C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",
477478
"C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",
478479
"C:\\Users\\testuser\\AppData\\Local\\pnpm",
480+
"C:\\Users\\testuser\\.local\\bin",
479481
"C:\\Users\\testuser\\.bun\\bin",
480482
"C:\\Users\\testuser\\scoop\\shims",
481483
"C:\\Shell\\Bin",
@@ -524,6 +526,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => {
524526
"C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs",
525527
"C:\\Users\\testuser\\AppData\\Local\\Volta\\bin",
526528
"C:\\Users\\testuser\\AppData\\Local\\pnpm",
529+
"C:\\Users\\testuser\\.local\\bin",
527530
"C:\\Users\\testuser\\.bun\\bin",
528531
"C:\\Users\\testuser\\scoop\\shims",
529532
"C:\\Shell\\Bin",
@@ -564,6 +567,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => {
564567
).toEqual({
565568
PATH: [
566569
"C:\\Users\\testuser\\AppData\\Roaming\\npm",
570+
"C:\\Users\\testuser\\.local\\bin",
567571
"C:\\Users\\testuser\\.bun\\bin",
568572
"C:\\Users\\testuser\\scoop\\shims",
569573
"C:\\Windows\\System32",

packages/shared/src/shell.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,9 @@ export function resolveKnownWindowsCliDirs(env: NodeJS.ProcessEnv): ReadonlyArra
682682
...(appData ? [`${appData}\\npm`] : []),
683683
...(localAppData ? [`${localAppData}\\Programs\\nodejs`, `${localAppData}\\Volta\\bin`] : []),
684684
...(localAppData ? [`${localAppData}\\pnpm`] : []),
685-
...(userProfile ? [`${userProfile}\\.bun\\bin`, `${userProfile}\\scoop\\shims`] : []),
685+
...(userProfile
686+
? [`${userProfile}\\.local\\bin`, `${userProfile}\\.bun\\bin`, `${userProfile}\\scoop\\shims`]
687+
: []),
686688
];
687689
}
688690

0 commit comments

Comments
 (0)