File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
packages/angular/cli/models
tests/legacy-cli/e2e/tests/commands Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -166,12 +166,12 @@ export abstract class ArchitectCommand extends Command<ArchitectCommandOptions>
166166 if ( ! targetSpec . project && this . target ) {
167167 // This runs each target sequentially.
168168 // Running them in parallel would jumble the log messages.
169- return from ( this . getProjectNamesByTarget ( this . target ) ) . pipe (
169+ return await from ( this . getProjectNamesByTarget ( this . target ) ) . pipe (
170170 concatMap ( project => runSingleTarget ( { ...targetSpec , project } ) ) ,
171171 toArray ( ) ,
172172 ) . toPromise ( ) . then ( results => results . every ( res => res === 0 ) ? 0 : 1 ) ;
173173 } else {
174- return runSingleTarget ( targetSpec ) . toPromise ( ) ;
174+ return await runSingleTarget ( targetSpec ) . toPromise ( ) ;
175175 }
176176 } catch ( e ) {
177177 if ( e instanceof schema . SchemaValidationException ) {
@@ -182,8 +182,6 @@ export abstract class ArchitectCommand extends Command<ArchitectCommandOptions>
182182 if ( unknownProperty in options ) {
183183 const dashes = unknownProperty . length === 1 ? '-' : '--' ;
184184 this . logger . fatal ( `Unknown option: '${ dashes } ${ unknownProperty } '` ) ;
185-
186- break ;
187185 }
188186 }
189187 newErrors . push ( schemaError ) ;
Original file line number Diff line number Diff line change 1- import { ng } from '../../utils/process' ;
1+ import { execAndWaitForOutputToMatch , ng } from '../../utils/process' ;
2+ import { expectToFail } from '../../utils/utils' ;
23
34export default async function ( ) {
4- const { stderr } = await ng ( 'build' , '--notanoption' ) ;
5+ // await expectToFail(() => ng('build', '--notanoption') );
56
6- if ( ! stderr . match ( / U n k n o w n o p t i o n : ' - - n o t a n o p t i o n ' / ) ) {
7- throw new Error ( `Expected "Unknown option:", received "${ JSON . stringify ( stderr ) } ".` ) ;
8- }
7+ await execAndWaitForOutputToMatch (
8+ 'ng' ,
9+ [ 'build' , '--notanoption' ] ,
10+ / U n k n o w n o p t i o n : ' - - n o t a n o p t i o n ' / ,
11+ ) ;
912}
You can’t perform that action at this time.
0 commit comments