@@ -29,6 +29,7 @@ export interface IBulkScriptActionOptions extends IBaseScriptActionOptions {
2929 enableParallelism : boolean ;
3030 ignoreMissingScript : boolean ;
3131 ignoreDependencyOrder : boolean ;
32+ allowWarningsInSuccessfulBuild : boolean ;
3233
3334 /**
3435 * Optional command to run. Otherwise, use the `actionName` as the command to run.
@@ -57,15 +58,15 @@ export class BulkScriptAction extends BaseScriptAction {
5758 private _verboseParameter : CommandLineFlagParameter ;
5859 private _parallelismParameter : CommandLineStringParameter | undefined ;
5960 private _ignoreDependencyOrder : boolean ;
61+ private _allowWarningsInSuccessfulBuild : boolean ;
6062
61- constructor (
62- options : IBulkScriptActionOptions
63- ) {
63+ constructor ( options : IBulkScriptActionOptions ) {
6464 super ( options ) ;
6565 this . _enableParallelism = options . enableParallelism ;
6666 this . _ignoreMissingScript = options . ignoreMissingScript ;
6767 this . _commandToRun = options . commandToRun || options . actionName ;
6868 this . _ignoreDependencyOrder = options . ignoreDependencyOrder ;
69+ this . _allowWarningsInSuccessfulBuild = options . allowWarningsInSuccessfulBuild ;
6970 }
7071
7172 public run ( ) : Promise < void > {
@@ -88,43 +89,42 @@ export class BulkScriptAction extends BaseScriptAction {
8889 // Collect all custom parameter values
8990 const customParameterValues : string [ ] = [ ] ;
9091
91- for ( const customParameter of this . customParameters ) {
92- customParameter . appendToArgList ( customParameterValues ) ;
93- }
94-
9592 const changedProjectsOnly : boolean = this . actionName === 'build' && this . _changedProjectsOnly . value ;
9693
97- const tasks : TaskSelector = new TaskSelector (
98- {
99- rushConfiguration : this . rushConfiguration ,
100- toFlags : this . _mergeToProjects ( ) ,
101- fromFlags : this . _fromFlag . values ,
102- commandToRun : this . _commandToRun ,
103- customParameterValues,
104- isQuietMode,
105- parallelism,
106- isIncrementalBuildAllowed : this . actionName === 'build' ,
107- changedProjectsOnly,
108- ignoreMissingScript : this . _ignoreMissingScript ,
109- ignoreDependencyOrder : this . _ignoreDependencyOrder
110- }
111- ) ;
94+ const tasks : TaskSelector = new TaskSelector ( {
95+ rushConfiguration : this . rushConfiguration ,
96+ toFlags : this . _mergeToProjects ( ) ,
97+ fromFlags : this . _fromFlag . values ,
98+ commandToRun : this . _commandToRun ,
99+ customParameterValues,
100+ isQuietMode,
101+ parallelism,
102+ isIncrementalBuildAllowed : this . actionName === 'build' ,
103+ changedProjectsOnly,
104+ ignoreMissingScript : this . _ignoreMissingScript ,
105+ ignoreDependencyOrder : this . _ignoreDependencyOrder ,
106+ allowWarningsInSuccessfulBuild : this . _allowWarningsInSuccessfulBuild
107+ } ) ;
112108
113- return tasks . execute ( ) . then (
114- ( ) => {
115- stopwatch . stop ( ) ;
109+ return tasks . execute ( ) . then ( ( ) => {
110+ stopwatch . stop ( ) ;
111+ console . log ( colors . green ( `rush ${ this . actionName } (${ stopwatch . toString ( ) } )` ) ) ;
112+ this . _doAfterTask ( stopwatch , true ) ;
113+ } ) . catch ( ( error : Error ) => {
114+ stopwatch . stop ( ) ;
115+ if ( error instanceof AlreadyReportedError ) {
116116 console . log ( colors . green ( `rush ${ this . actionName } (${ stopwatch . toString ( ) } )` ) ) ;
117- this . _doAfterTask ( stopwatch , true ) ;
118- } )
119- . catch ( ( error : Error ) => {
117+ } else {
120118 if ( error && error . message ) {
121119 console . log ( 'Error: ' + error . message ) ;
122120 }
123- stopwatch . stop ( ) ;
121+
124122 console . log ( colors . red ( `rush ${ this . actionName } - Errors! (${ stopwatch . toString ( ) } )` ) ) ;
125- this . _doAfterTask ( stopwatch , false ) ;
126- throw new AlreadyReportedError ( ) ;
127- } ) ;
123+ }
124+
125+ this . _doAfterTask ( stopwatch , false ) ;
126+ throw new AlreadyReportedError ( ) ;
127+ } ) ;
128128 }
129129
130130 protected onDefineParameters ( ) : void {
0 commit comments