Skip to content

Commit

Permalink
Better error logging with blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
rsefer committed Jul 26, 2023
1 parent 69c7990 commit cea257b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ function cmd(...command) {
shell: true
});
return new Promise((resolveFunc) => {
// p.stdout.on('data', (x) => {
// process.stdout.write(x.toString());
// });
p.stdout.on('data', (x) => {
if (x.toString().includes('Error:')) {
process.stdout.write(x.toString());
log('error', `Failed building blocks - See above error.`);
}
});
p.stderr.on('data', (x) => {
process.stderr.write(x.toString());
log('error', `Failed building blocks - See above error.`);
Expand Down

0 comments on commit cea257b

Please sign in to comment.