Skip to content

Commit

Permalink
Try to log publish errors (#7295)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed May 12, 2023
1 parent 6d332b4 commit 9c6f972
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/release/utils/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,16 @@ async function publishPackageInCI(
}" >> ~/.npmrc`
);

return spawn('npm', args, { cwd: path });
const spawnPromise = spawn('npm', args, { cwd: path });
const childProcess = spawnPromise.childProcess;
childProcess.stdout?.on('data', function (data) {
console.log(`[publishing ${pkg}] stdout: `, data.toString());
});
childProcess.stderr?.on('data', function (data) {
console.log(`[publishing ${pkg}] stderr: `, data.toString());
});
await spawnPromise;
return spawnPromise;
} catch (err) {
throw err;
}
Expand Down

0 comments on commit 9c6f972

Please sign in to comment.