Merge 604c2d9919 into 4583f88626
This commit is contained in:
commit
6b1ed0b76d
@ -115,7 +115,15 @@ if (!shouldBuild()) {
|
|||||||
} else {
|
} else {
|
||||||
logRunner("Building TypeScript (dist is stale).");
|
logRunner("Building TypeScript (dist is stale).");
|
||||||
const pnpmArgs = ["exec", compiler, ...projectArgs];
|
const pnpmArgs = ["exec", compiler, ...projectArgs];
|
||||||
const buildCmd = process.platform === "win32" ? "cmd.exe" : "pnpm";
|
|
||||||
|
// PR Fix: Check for local pnpm binary if global might be missing
|
||||||
|
let pnpmCmd = "pnpm";
|
||||||
|
const localPnpm = path.join(cwd, "node_modules", ".bin", process.platform === "win32" ? "pnpm.cmd" : "pnpm");
|
||||||
|
if (fs.existsSync(localPnpm)) {
|
||||||
|
pnpmCmd = localPnpm;
|
||||||
|
}
|
||||||
|
|
||||||
|
const buildCmd = process.platform === "win32" ? "cmd.exe" : pnpmCmd;
|
||||||
const buildArgs =
|
const buildArgs =
|
||||||
process.platform === "win32" ? ["/d", "/s", "/c", "pnpm", ...pnpmArgs] : pnpmArgs;
|
process.platform === "win32" ? ["/d", "/s", "/c", "pnpm", ...pnpmArgs] : pnpmArgs;
|
||||||
const build = spawn(buildCmd, buildArgs, {
|
const build = spawn(buildCmd, buildArgs, {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user