| ... | @@ -460,7 +460,7 @@ effectIt.layer(NodeServices.layer)("resolveSpawnCommand", (it) => { | ... | @@ -460,7 +460,7 @@ effectIt.layer(NodeServices.layer)("resolveSpawnCommand", (it) => { |
| 460 | }); | 460 | }); |
| 461 | | 461 | |
| 462 | effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { | 462 | effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { |
| 463 | it.effect("returns the baseline no-profile PATH patch when node is already available", () => | 463 | it.effect("uses known CLI directories as a fallback without changing shell PATH priority", () => |
| 464 | Effect.gen(function* () { | 464 | Effect.gen(function* () { |
| 465 | const readEnvironment = vi.fn( | 465 | const readEnvironment = vi.fn( |
| 466 | (_names: ReadonlyArray<string>, options?: { loadProfile?: boolean }) => | 466 | (_names: ReadonlyArray<string>, options?: { loadProfile?: boolean }) => |
| ... | @@ -483,6 +483,8 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { | ... | @@ -483,6 +483,8 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { |
| 483 | ), | 483 | ), |
| 484 | ).toEqual({ | 484 | ).toEqual({ |
| 485 | PATH: [ | 485 | PATH: [ |
| | 486 | "C:\\Shell\\Bin", |
| | 487 | "C:\\Windows\\System32", |
| 486 | "C:\\Users\\testuser\\AppData\\Roaming\\npm", | 488 | "C:\\Users\\testuser\\AppData\\Roaming\\npm", |
| 487 | "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs", | 489 | "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs", |
| 488 | "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin", | 490 | "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin", |
| ... | @@ -490,8 +492,6 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { | ... | @@ -490,8 +492,6 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { |
| 490 | "C:\\Users\\testuser\\.local\\bin", | 492 | "C:\\Users\\testuser\\.local\\bin", |
| 491 | "C:\\Users\\testuser\\.bun\\bin", | 493 | "C:\\Users\\testuser\\.bun\\bin", |
| 492 | "C:\\Users\\testuser\\scoop\\shims", | 494 | "C:\\Users\\testuser\\scoop\\shims", |
| 493 | "C:\\Shell\\Bin", | | |
| 494 | "C:\\Windows\\System32", | | |
| 495 | ].join(";"), | 495 | ].join(";"), |
| 496 | }); | 496 | }); |
| 497 | expect(readEnvironment).toHaveBeenCalledTimes(1); | 497 | expect(readEnvironment).toHaveBeenCalledTimes(1); |
| ... | @@ -532,6 +532,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { | ... | @@ -532,6 +532,7 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { |
| 532 | PATH: [ | 532 | PATH: [ |
| 533 | "C:\\Profile\\Node", | 533 | "C:\\Profile\\Node", |
| 534 | "C:\\Windows\\System32", | 534 | "C:\\Windows\\System32", |
| | 535 | "C:\\Shell\\Bin", |
| 535 | "C:\\Users\\testuser\\AppData\\Roaming\\npm", | 536 | "C:\\Users\\testuser\\AppData\\Roaming\\npm", |
| 536 | "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs", | 537 | "C:\\Users\\testuser\\AppData\\Local\\Programs\\nodejs", |
| 537 | "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin", | 538 | "C:\\Users\\testuser\\AppData\\Local\\Volta\\bin", |
| ... | @@ -539,7 +540,6 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { | ... | @@ -539,7 +540,6 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { |
| 539 | "C:\\Users\\testuser\\.local\\bin", | 540 | "C:\\Users\\testuser\\.local\\bin", |
| 540 | "C:\\Users\\testuser\\.bun\\bin", | 541 | "C:\\Users\\testuser\\.bun\\bin", |
| 541 | "C:\\Users\\testuser\\scoop\\shims", | 542 | "C:\\Users\\testuser\\scoop\\shims", |
| 542 | "C:\\Shell\\Bin", | | |
| 543 | ].join(";"), | 543 | ].join(";"), |
| 544 | FNM_DIR: "C:\\Users\\testuser\\AppData\\Roaming\\fnm", | 544 | FNM_DIR: "C:\\Users\\testuser\\AppData\\Roaming\\fnm", |
| 545 | FNM_MULTISHELL_PATH: "C:\\Users\\testuser\\AppData\\Local\\fnm_multishells\\123", | 545 | FNM_MULTISHELL_PATH: "C:\\Users\\testuser\\AppData\\Local\\fnm_multishells\\123", |
| ... | @@ -576,11 +576,11 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { | ... | @@ -576,11 +576,11 @@ effectIt.layer(NodeServices.layer)("resolveWindowsEnvironment", (it) => { |
| 576 | ), | 576 | ), |
| 577 | ).toEqual({ | 577 | ).toEqual({ |
| 578 | PATH: [ | 578 | PATH: [ |
| | 579 | "C:\\Windows\\System32", |
| 579 | "C:\\Users\\testuser\\AppData\\Roaming\\npm", | 580 | "C:\\Users\\testuser\\AppData\\Roaming\\npm", |
| 580 | "C:\\Users\\testuser\\.local\\bin", | 581 | "C:\\Users\\testuser\\.local\\bin", |
| 581 | "C:\\Users\\testuser\\.bun\\bin", | 582 | "C:\\Users\\testuser\\.bun\\bin", |
| 582 | "C:\\Users\\testuser\\scoop\\shims", | 583 | "C:\\Users\\testuser\\scoop\\shims", |
| 583 | "C:\\Windows\\System32", | | |
| 584 | ].join(";"), | 584 | ].join(";"), |
| 585 | FNM_DIR: "C:\\Users\\testuser\\AppData\\Roaming\\fnm", | 585 | FNM_DIR: "C:\\Users\\testuser\\AppData\\Roaming\\fnm", |
| 586 | }); | 586 | }); |