style: use non-capturing pnpm regex group

This commit is contained in:
Ayaan Zaidi
2026-04-15 10:31:53 +05:30
parent ccedc506a5
commit 2cc97989d3

View File

@@ -4,7 +4,7 @@ import path from "node:path";
import { buildCmdExeCommandLine } from "./windows-cmd-helpers.mjs";
function isPnpmExecPath(value) {
return /^pnpm(?:-cli)?(?:\.([cm]?js|cmd|exe))?$/.test(path.basename(value).toLowerCase());
return /^pnpm(?:-cli)?(?:\.(?:[cm]?js|cmd|exe))?$/.test(path.basename(value).toLowerCase());
}
function hasScriptShebang(value) {