Skip to content

A platform for community discussion. Free, open, simple.

DEV: Improve pnpmfile workspace workaround (#29881)

David Taylorfe88e2239d5e
diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs
index 75c353fc8df..0ebc64c2241 100644
--- a/.pnpmfile.cjs
+++ b/.pnpmfile.cjs
@@ -31,7 +31,9 @@ if (
"> pnpm was run inside a plugin directory. Re-executing with --ignore-workspace..."
);
- const indexOfPnpm = process.argv.findIndex((a) => a.endsWith("pnpm"));
+ const indexOfPnpm = process.argv.findIndex(
+ (a) => a.includes("/pnpm") || a.endsWith("pnpm")
+ );
const newArgs = [...process.argv];
newArgs.splice(indexOfPnpm + 1, 0, "--ignore-workspace");