From 79405d8251d2c37a4a994650b042d2552c383cde Mon Sep 17 00:00:00 2001 From: coreybutler <770982+coreybutler@users.noreply.github.com> Date: Tue, 3 Nov 2026 10:47:54 -0600 Subject: [PATCH] fix: resign pnpm/yarn JS entrypoints on firewall trust nvm firewall trust module previously re-signed only .cmd/.bat launchers. Proxy launches pnpm.mjs (and yarn.js/.cjs/.mjs), so trust left the real entrypoint unsigned and the next run hit NVM4306. Resign nested package-manager JS/CJS/MJS paths from PackageManagerCliRelPathsFor, plus standalone PNPM_HOME *.mjs/*.cjs/*.js. Signed-off-by: Corey Butler --- src/commands/firewall/trust_after_windows.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/commands/firewall/trust_after_windows.go b/src/commands/firewall/trust_after_windows.go index 695e8c5..f9fbfee 100644 --- a/src/commands/firewall/trust_after_windows.go +++ b/src/commands/firewall/trust_after_windows.go @@ -58,6 +58,8 @@ func findModuleLaunchers(name string) []string { out = append(out, path) } + cliRels := verifycache.PackageManagerCliRelPathsFor(name) + root := settings.Expand(settings.Global().Root) if root != "" && root != "." { entries, err := os.ReadDir(root) @@ -73,6 +75,9 @@ func findModuleLaunchers(name string) []string { dir := filepath.Join(root, n) add(filepath.Join(dir, name+".cmd")) add(filepath.Join(dir, name+".bat")) + for _, rel := range cliRels { + add(filepath.Join(dir, filepath.FromSlash(rel))) + } } } } @@ -82,11 +87,14 @@ func findModuleLaunchers(name string) []string { add(filepath.Join(appdata, "npm", name+".bat")) } - // Standalone pnpm (get.pnpm.io): PNPM_HOME\bin\pnpm.cmd + // Standalone pnpm (get.pnpm.io): PNPM_HOME\bin\pnpm.cmd (+ optional .mjs) if strings.EqualFold(name, "pnpm") { if home := strings.TrimSpace(os.Getenv("PNPM_HOME")); home != "" { add(filepath.Join(home, "bin", name+".cmd")) add(filepath.Join(home, "bin", name+".bat")) + add(filepath.Join(home, "bin", name+".mjs")) + add(filepath.Join(home, "bin", name+".cjs")) + add(filepath.Join(home, "bin", name+".js")) add(filepath.Join(home, name+".cmd")) add(filepath.Join(home, name+".bat")) }