diff --git a/scripts/pnpm-runner.mjs b/scripts/pnpm-runner.mjs index 307030537f8..63abe522aae 100644 --- a/scripts/pnpm-runner.mjs +++ b/scripts/pnpm-runner.mjs @@ -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) {