Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-6649

CLI should automatically remove CLI flags from list of positional arguments.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-cli
    • Labels:
      None

      Description

      CLI relies on positional arguments to specify command and arguments, such as "cordova platform add foo".

      There are also a set of optional flags, such as "-verbose" "-silent", etc.

      Right now, we use optimist to parse the command line to separate out optional flags from positional arguments, but we don't actually use its list of positional args. Apparently this has to do with plugman re-parsing the CLI args for its own parameter handling.

      We should do something cleaner instead, such as passing all flags over to plugin handler as a dictionary instead of as an array of strings.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mmocny Michal Mocny
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: