From 831d1b79e745c90516a2438c24c4fe6b2826d287 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 30 Oct 2023 11:45:34 -0700 Subject: [PATCH] Directly execute fnm instead of using PATH --- .changeset/quiet-bees-occur.md | 5 +++++ src/fnm.ts | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/quiet-bees-occur.md diff --git a/.changeset/quiet-bees-occur.md b/.changeset/quiet-bees-occur.md new file mode 100644 index 0000000..c21db74 --- /dev/null +++ b/.changeset/quiet-bees-occur.md @@ -0,0 +1,5 @@ +--- +"every-ts": patch +--- + +Directly execute fnm instead of using PATH diff --git a/src/fnm.ts b/src/fnm.ts index d5dd822..13ed3ad 100644 --- a/src/fnm.ts +++ b/src/fnm.ts @@ -61,13 +61,12 @@ export async function ensureFnm() { if (process.platform !== `win32`) { await fs.promises.chmod(path.join(fnmDir, `fnm`), 0o755); - process.env[`PATH`] = `${fnmDir}${path.delimiter}${process.env[`PATH`]}`; } fnmInstalled = true; } -const fnmExe = process.platform === `win32` ? path.join(fnmDir, `fnm.exe`) : `fnm`; +const fnmExe = path.join(fnmDir, process.platform === `win32` ? `fnm.exe` : `fnm`); const installedNode = new Set();