-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
🐞 Bug report
Command (mark with an x)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
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.
- @netlify-builder/deploy
- angular-cli-ghpages
- as well as ngx-deploy-docker, ngx-deploy-npm, and ngx-deploy-ftp
- there could be more...
🔬 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
cd src npm install -
Build the project:
npm run build
-
Create a local npm link:
cd dist npm link -
Go to a new folder and create a fresh angular project:
ng new test cd test
-
Add the local version of
angular-cli-ghpages.npm link angular-cli-ghpages
-
Now execute the
ng-addschematic.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
ng deploy --no-build
🔥 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