You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Cannot pass arguments to cordova CLI when running ionic cordova run/build etc
Steps to Reproduce:
e.g. To run on iOS 12 you need to provide a buildFlag arg.
ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"
Output:
ng run app:ionic-cordova-serve --host=0.0.0.0 --port=8100 --platform=ios --buildFlag=-UseModernBuildSystem=0
[ng] Unknown option: '--buildFlag'
It seems that the flag is passed to ng (angular)
I have also tried adding another set of '--' e.g. ionic cordova run ios -- -- --buildFlag="-UseModernBuildSystem=0"
But then the cordova command is run with an extra set of '--' and thus is not applied
The text was updated successfully, but these errors were encountered:
@georgechr Thanks for the issue! This was a bug in the v4 build/serve code. Separated args (e.g. args after the -- separator) should be forwarded only to the Cordova CLI for the Cordova run/emulate commands. Before the fix, it was forwarding them to both, but because --buildFlag is an unknown arg, the Angular CLI exits with an error.
Unfortunately, because we wrap two CLIs in one command, this means that currently with the Cordova run/emulate commands, you can't pass extra args to the Angular CLI. See #3652 for this.
Description:
Cannot pass arguments to cordova CLI when running ionic cordova run/build etc
Steps to Reproduce:
e.g. To run on iOS 12 you need to provide a buildFlag arg.
ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"
Output:
It seems that the flag is passed to ng (angular)
I have also tried adding another set of '--' e.g. ionic cordova run ios -- -- --buildFlag="-UseModernBuildSystem=0"
But then the cordova command is run with an extra set of '--' and thus is not applied
The text was updated successfully, but these errors were encountered: