Skip to content

Cannot pass arguments to cordova CLI #3602

Description

@georgechr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcordovaIonic projects integrated with Cordovaproject type: angularIonic Angular 4+ projects

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions