Browse Source
* be more verbose on shell inference issues in Windows * add changeset * fix shell inference with scoop * change changeset text * test scoop shims * don't concat paths * skip instead of not emitting tests * setup scoop in windows * use test.skipremotes/origin/renovate/reqwest-0.x-lockfile


5 changed files with 77 additions and 6 deletions
@ -0,0 +1,5 @@ |
|||||||
|
--- |
||||||
|
"fnm": patch |
||||||
|
--- |
||||||
|
|
||||||
|
windows: fix shell inference in powershell when using scoop's shims |
@ -0,0 +1,33 @@ |
|||||||
|
import { script } from "./shellcode/script.js" |
||||||
|
import { Bash, Fish, PowerShell, WinCmd, Zsh } from "./shellcode/shells.js" |
||||||
|
import testNodeVersion from "./shellcode/test-node-version.js" |
||||||
|
import describe from "./describe.js" |
||||||
|
import os from "node:os" |
||||||
|
import { execa } from "execa" |
||||||
|
|
||||||
|
if (os.platform() !== "win32") { |
||||||
|
test.skip("scoop shims only work on Windows", () => {}) |
||||||
|
} else { |
||||||
|
beforeAll(async () => { |
||||||
|
// Create a scoop shim for tests
|
||||||
|
await execa(`scoop`, [ |
||||||
|
"shim", |
||||||
|
"add", |
||||||
|
"fnm_release", |
||||||
|
"target/release/fnm.exe", |
||||||
|
]) |
||||||
|
}) |
||||||
|
|
||||||
|
for (const shell of [Bash, Zsh, Fish, PowerShell, WinCmd]) { |
||||||
|
describe(shell, () => { |
||||||
|
test(`scoop shims infer the shell`, async () => { |
||||||
|
await script(shell) |
||||||
|
.then(shell.env({ executableName: "fnm_release" })) |
||||||
|
.then(shell.call("fnm_release", ["install", "v20.14.0"])) |
||||||
|
.then(shell.call("fnm_release", ["use", "v20.14.0"])) |
||||||
|
.then(testNodeVersion(shell, "v20.14.0")) |
||||||
|
.execute(shell) |
||||||
|
}) |
||||||
|
}) |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue