Skip to content

Commit

Permalink
report stderr if a problem occurred from trying to run an execute com…
Browse files Browse the repository at this point in the history
…mand, #166
  • Loading branch information
zepumph committed Apr 25, 2023
1 parent abe65f2 commit e505ecb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions js/server/QuickServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ class QuickServer {

// trimmed down and separated error messages, used to track the state of individual errors and show
// abbreviated errors for the Slack CT Notifier
errorMessages: result.code === 0 ? [] : this.parseCompositeError( result.stdout, name )
errorMessages: result.code === 0 ? [] : this.parseCompositeError( result.stdout, name, result.stderr )
};
}

Expand Down Expand Up @@ -468,12 +468,20 @@ class QuickServer {
*
* @param {string} message
* @param {string} name
* @param {string} stderr - if the error is in the running process, and not the report
* @returns {string[]}
* @private
*/
parseCompositeError( message, name ) {
parseCompositeError( message, name, stderr = '' ) {
const errorMessages = [];

if ( stderr ) {
errorMessages.push( `error testing ${name}: ${stderr}` );
if ( !message ) {
return errorMessages;
}
}

// most lint and tsc errors have a file associated with them. look for them in a line via 4 sets of slashes
// Extensions should match those found in CHIPPER/lint
// Don't match to the end of the line ($), because tsc puts the file and error on the same line.
Expand Down

0 comments on commit e505ecb

Please sign in to comment.