hunk.code_window:         });
           if (error) {
             throw error;
           }
         }
       } else {
         // Non TTY display error message.
         logger.error(missingTargetMessage);
       }
  
hunk.labels: keep replace replace replace replace keep keep keep keep keep
hunk.file_path: packages/angular/cli/src/command-builder/architect-base-command-module.ts
hunk.type: replace
file: import { execAndWaitForOutputToMatch, ng } from '../../utils/process';
  import { expectToFail } from '../../utils/utils';
  
  export default async function () {
    await expectToFail(() => ng('build', '--notanoption'));
  
    await execAndWaitForOutputToMatch(
      'ng',
      ['build', '--notanoption'],
      /Unknown argument: notanoption/,
    );
  
    const ngGenerateArgs = ['generate', 'component', 'component-name', '--notanoption'];
    await expectToFail(() => ng(...ngGenerateArgs));
  
    await execAndWaitForOutputToMatch('ng', ngGenerateArgs, /Unknown argument: notanoption/);
  }
  