Skip to content

Commit b47cef3

Browse files
fix: capture and highlight stderr output from dspublisher process (#4745) (#4749)
Co-authored-by: Tomi Virkki <[email protected]>
1 parent 94ea8d4 commit b47cef3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

dspublisher/dspublisher-scripts.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ async function checkPreConditions() {
4444
resolve();
4545
} else {
4646
reject(
47-
new Error('Maven is not installed. Plase make sure it is installed and in your PATH.')
47+
new Error('Maven is not installed. Please make sure it is installed and in your PATH.')
4848
);
4949
}
5050
});
5151

5252
ps.on('error', () => {
53-
new Error('Maven is not installed. Plase make sure it is installed and in your PATH.');
53+
new Error('Maven is not installed. Please make sure it is installed and in your PATH.');
5454
});
5555
});
5656

@@ -407,6 +407,14 @@ async function execute(shellCommand, phases, ignoredLogSignals = []) {
407407
phase.done = true;
408408
}
409409
});
410+
411+
ps.stderr.on('data', (data) => {
412+
if (ignoredLogSignals.every((signal) => !data.toString().includes(signal))) {
413+
const redColor = '\x1b[31m';
414+
const defaultColor = '\x1b[0m';
415+
logProgress(progressState, `${redColor}${data.toString()}${defaultColor}`);
416+
}
417+
});
410418
});
411419
}
412420

0 commit comments

Comments
 (0)