mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Improve pnpmfile workspace workaround (#29881)
Some setups have pnpm installed as `pnpm.cjs`, so the `endsWith` check wasn't working
This commit is contained in:
parent
250a145361
commit
fe88e2239d
@ -31,7 +31,9 @@ if (
|
|||||||
"> pnpm was run inside a plugin directory. Re-executing with --ignore-workspace..."
|
"> 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];
|
const newArgs = [...process.argv];
|
||||||
newArgs.splice(indexOfPnpm + 1, 0, "--ignore-workspace");
|
newArgs.splice(indexOfPnpm + 1, 0, "--ignore-workspace");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user