apache / cordova-docs

Apache Cordova Documentation
https://cordova.apache.org/
Apache License 2.0
350 stars 554 forks source link

Improve CLI usage documentation on windows #1336

Open breautek opened 7 months ago

breautek commented 7 months ago

On windows using Command Prompt or Powershell, when we need to use the intermediate -- to pass through arguments, the -- needs to be enclosed in quotations

For example:

cordova build android --release "--" --packageType=apk

All of our examples show MacOS / Linux usage. This is something I personally help people resolve in discussions/slack, but can also be a source of bug reports.

Below is a list of links that I found that uses pass through CLI args, but this list may not be exhaustive.

https://cordova.apache.org/docs/en/12.x/reference/cordova-cli/index.html https://cordova.apache.org/docs/en/12.x/guide/platforms/android/index.html

breautek commented 7 months ago

Alternatively instead of having a "windows" and "unix/bash" version of the command line, cordova build android --release "--" --packageType=apk does appear to work in bash environments as well. So avoid creating too much verbosity we could just show all CLI examples to use the "--" separator, with the quotations.