🐞 Bug report
Command (mark with an x)
Is this a regression?
This worked in v13 of the CLI
Description
We are working on updating our ng deploy schematic for Angular 14, unfortunately some command line arguments are no longer detected correctly. Arguments like noBuild, noSilent, noDotFiles no longer work, but buildTarget and dryRun do. I assume this is related with #22778 and the fact that Yargs supports --no-flags. In the past, the word no had no meaning, now it has one: https://github.com/yargs/yargs/blob/main/docs/tricks.md#negate
In Angular 13 i was able write no-build as an argument and it was used as it-is, but now this is interpreted as the negation of build – which is an unknown argument. This breaks a couple of builders that all share some code/ideas and use the same argument called no-build.
🔬 Minimal Reproduction
Please follow our README for contributors, which is essentially:
-
Clone the project
git clone https://github.com/angular-schule/angular-cli-ghpages.git
cd angular-cli-ghpages
-
Install the dependencies
-
Build the project:
-
Create a local npm link:
-
Go to a new folder and create a fresh angular project:
-
Add the local version of angular-cli-ghpages.
npm link angular-cli-ghpages
-
Now execute the ng-add schematic.
ng add angular-cli-ghpages
-
This will work, but will complain about a missing git configuration (which is fine here)
ng deploy
ng deploy --dry-run
-
But this will NOT work, same for all other arguments with a "no" in the name
🔥 Exception or Error
ng deploy --no-build
Error: Unknown argument: build
🌍 Your Environment
Angular CLI: 14.0.2
Node: 16.15.1
Package Manager: npm 8.11.0
OS: darwin arm64
Angular: 14.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1400.2
@angular-devkit/build-angular 14.0.2
@angular-devkit/core 14.0.2
@angular-devkit/schematics 14.0.2
@schematics/angular 14.0.2
rxjs 7.5.5
typescript 4.7.4
🐞 Bug report
Command (mark with an
x)Is this a regression?
This worked in v13 of the CLI
Description
We are working on updating our ng deploy schematic for Angular 14, unfortunately some command line arguments are no longer detected correctly. Arguments like
noBuild,noSilent,noDotFilesno longer work, butbuildTargetanddryRundo. I assume this is related with #22778 and the fact that Yargs supports--no-flags. In the past, the wordnohad no meaning, now it has one: https://github.com/yargs/yargs/blob/main/docs/tricks.md#negateIn Angular 13 i was able write
no-buildas an argument and it was used as it-is, but now this is interpreted as the negation ofbuild– which is an unknown argument. This breaks a couple of builders that all share some code/ideas and use the same argument calledno-build.🔬 Minimal Reproduction
Please follow our README for contributors, which is essentially:
Clone the project
git clone https://github.com/angular-schule/angular-cli-ghpages.git cd angular-cli-ghpagesInstall the dependencies
cd src npm installBuild the project:
Create a local npm link:
cd dist npm linkGo to a new folder and create a fresh angular project:
Add the local version of
angular-cli-ghpages.Now execute the
ng-addschematic.This will work, but will complain about a missing git configuration (which is fine here)
But this will NOT work, same for all other arguments with a "no" in the name
🔥 Exception or Error
🌍 Your Environment