File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ export class RushCommandLineParser extends CommandLineParser {
355355 // performs nontrivial work that can throw an exception. Either the Rush class would need
356356 // to handle reporting for those exceptions, or else _populateActions() should be moved
357357 // to a RushCommandLineParser lifecycle stage that can handle it.
358- if ( process . exitCode ! > 0 ) {
358+ if ( ! process . exitCode || process . exitCode > 0 ) {
359359 process . exit ( process . exitCode ) ;
360360 } else {
361361 process . exit ( 1 ) ;
Original file line number Diff line number Diff line change @@ -433,7 +433,11 @@ export function installAndRun(
433433 }
434434 ) ;
435435
436- return result . status || 1 ; // If result.status is null, the process was terminated from a signal
436+ if ( result . status ) {
437+ return result . status ;
438+ } else {
439+ throw result . error || new Error ( 'An unknown error occurred.' ) ;
440+ }
437441}
438442
439443export function runWithErrorAndStatusCode ( fn : ( ) => number ) : void {
You can’t perform that action at this time.
0 commit comments