Skip to content

Commit

Permalink
Log stderr of spawned processes
Browse files Browse the repository at this point in the history
Without this, stderr is never shown, even with verbose logging
  • Loading branch information
salomvary-sc committed Apr 22, 2024
1 parent 0adea47 commit a663f20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/adminServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,13 @@ function spawnProcess(
process.stdout.on('end', () => {
stdout = Buffer.concat(output);
});
process.stderr.on('data', (data) => {
if (typeof data === 'string') {
errors.push(Buffer.from(data));
} else {
errors.push(data);
}
});
process.stderr.on('end', () => {
stderr = Buffer.concat(errors);
});
Expand Down

0 comments on commit a663f20

Please sign in to comment.