Add logs to diagnose broken pnpm

This commit is contained in:
Sander Declerck 2025-09-22 15:15:41 +02:00
parent f7589160af
commit 644b51795a
No known key found for this signature in database

View file

@ -5,6 +5,12 @@ export function runPnpmCommand(args, toolName = "pnpm") {
try { try {
let result; let result;
ui.writeInformation(
`Executing ${toolName} with arguments:`,
args.join(" ")
);
ui.writeInformation("----------------------------");
if (toolName === "pnpm") { if (toolName === "pnpm") {
result = spawnSync("pnpm", args, { stdio: "inherit" }); result = spawnSync("pnpm", args, { stdio: "inherit" });
} else if (toolName === "pnpx") { } else if (toolName === "pnpx") {
@ -13,6 +19,9 @@ export function runPnpmCommand(args, toolName = "pnpm") {
throw new Error(`Unsupported tool name for aikido-pnpm: ${toolName}`); throw new Error(`Unsupported tool name for aikido-pnpm: ${toolName}`);
} }
ui.writeInformation("----------------------------");
ui.writeInformation(`${toolName} process exited with code:`, result.status);
if (result.status !== null) { if (result.status !== null) {
return { status: result.status }; return { status: result.status };
} }