@@ -513,8 +513,8 @@ export abstract class AngularUtilities {
513513 * @param command - The command to run.
514514 * @param options - Options for running the command.
515515 */
516- static runCommand ( directory : Path , command : AngularCliCommands , options : AngularCliOptions < typeof command > ) : void {
517- CPUtilities . execSync ( `cd ${ directory } && npx @angular/cli@${ this . CLI_VERSION } ${ command } ${ optionsToCliString ( options ) } ` ) ;
516+ static async runCommand ( directory : Path , command : AngularCliCommands , options : AngularCliOptions < typeof command > ) : Promise < void > {
517+ await CPUtilities . exec ( `cd ${ directory } && npx @angular/cli@${ this . CLI_VERSION } ${ command } ${ optionsToCliString ( options ) } ` ) ;
518518 }
519519
520520 /**
@@ -530,7 +530,7 @@ export abstract class AngularUtilities {
530530 navElement : AddNavElementConfig | undefined ,
531531 domain : string | undefined
532532 ) : Promise < void > {
533- this . runCommand ( root , `generate component pages/${ pageName } ` , { '--skip-tests' : true , '--inline-style' : true } ) ;
533+ await this . runCommand ( root , `generate component pages/${ pageName } ` , { '--skip-tests' : true , '--inline-style' : true } ) ;
534534
535535 if ( navElement ) {
536536 await this . addNavElement ( root , navElement ) ;
@@ -805,7 +805,7 @@ export abstract class AngularUtilities {
805805 { provide : 'HTTP_INTERCEPTORS' , useClass : 'OfflineRequestInterceptor' as any , multi : true } ,
806806 [ { defaultImport : false , element : 'OfflineRequestInterceptor' , path : NpmPackage . NGX_PWA } ]
807807 ) ;
808- this . runCommand ( root , `add @angular/pwa@${ this . CLI_VERSION } ` , { '--skip-confirmation' : true } ) ;
808+ await this . runCommand ( root , `add @angular/pwa@${ this . CLI_VERSION } ` , { '--skip-confirmation' : true } ) ;
809809 await NpmUtilities . install ( name , [ NpmPackage . NGX_PWA ] ) ;
810810 await FsUtilities . updateFile (
811811 getPath ( root , 'src' , 'app' , 'app.component.html' ) ,
0 commit comments