A platform for community discussion. Free, open, simple.
DEV: Add --ignore-workspace immediately after 'pnpm' in arguments (#29662)
David Taylor698571e24b37
diff --git a/.pnpmfile.cjs b/.pnpmfile.cjsindex 3a21a8206d0..75c353fc8df 100644--- a/.pnpmfile.cjs+++ b/.pnpmfile.cjs@@ -31,14 +31,14 @@ if ("> pnpm was run inside a plugin directory. Re-executing with --ignore-workspace...");+ const indexOfPnpm = process.argv.findIndex((a) => a.endsWith("pnpm"));+ const newArgs = [...process.argv];+ newArgs.splice(indexOfPnpm + 1, 0, "--ignore-workspace");+try {- execFileSync(- process.argv[0],- [...process.argv.slice(1), "--ignore-workspace"],- {- stdio: "inherit",- }- );+ execFileSync(newArgs[0], newArgs.slice(1), {+ stdio: "inherit",+ });} catch (e) {if (e.status) {process.exit(e.status);