Skip to content

doc: document Windows quoting requirement for pass-through arguments - #735

Merged
GitToTheHub merged 2 commits into
apache:masterfrom
rishi919-rgb:docs-windows-platform-opts
Oct 11, 2026
Merged

GitToTheHub merged 2 commits into
apache:masterfrom
rishi919-rgb:docs-windows-platform-opts

Conversation

@rishi919-rgb

Copy link
Copy Markdown
Contributor

Platforms affected

Documentation / CLI (All platforms, specifically Windows Command Prompt and PowerShell, Android, iOS)

Description

Description

This PR updates doc/readme.md (which generates the Cordova Command-line-interface (CLI) Commands documentation page on cordova.apache.org) to document Windows quoting requirements for the platform options pass-through separator (--):

  1. Platform-specific options overview:
    • Added a note explaining that on Windows (Command Prompt and PowerShell), the -- pass-through separator must be enclosed in quotation marks ("--") so that the shell forwards the arguments to platform build scripts correctly.
  2. CLI Usage Example:
    • Provided separate examples for Unix/macOS (--) and Windows ("--") for release builds with signing parameters.
  3. cordova build and cordova run option tables and examples:
    • Clarified the <platformOpts> table row to note "--" on Windows shells.
    • Added both Unix/macOS and Windows examples under the cordova build examples section.

Motivation and Context

Motivation and Context

Relates to apache/cordova-docs#1336 and follows up on apache/cordova-docs#1530.

On Windows shells (PowerShell and Command Prompt), passing platform-specific arguments using unquoted -- causes arguments to be dropped, parsed as parameter terminators, or fail argument forwarding (as reported in apache/cordova-android#1671). The documentation in apache/cordova-docs was updated in PR apache/cordova-docs#1530, and reviewer @GitToTheHub requested updating doc/readme.md in apache/cordova-cli to keep the auto-generated CLI Reference documentation synchronized.

How Has This Been Tested?

Testing

  • Ran npm test locally:
    • eslint . passed with 0 errors.
    • Jasmine unit test suite passed: 68 specs, 0 failures.
  • Verified Markdown syntax and formatting in doc/readme.md.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation improvement

Checklist:

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@codecov-commenter

codecov-commenter commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.90%. Comparing base (55dcdd6) to head (d8f4720).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #735   +/-   ##
=======================================
  Coverage   72.90%   72.90%           
=======================================
  Files           3        3           
  Lines         620      620           
=======================================
  Hits          452      452           
  Misses        168      168           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread doc/readme.md

## CLI Syntax

```bash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add here that this is a Unix/macOS example. Add a windows sample accordingly.

Comment thread doc/readme.md Outdated
**Unix/macOS:**

```bash
cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keystore path ..\android.keystore is incorrect for Unix/macOS. That backslash remains literal, so it won’t reference the keystore in the parent directory. Change it to ../android.keystore. This can also be applied for Windows, since Node.js accepts forward slashes in Windows file paths.

Comment thread doc/readme.md Outdated
**Unix/macOS:**

```bash
cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same here, change the keystore path ../android.keystore.

Comment thread doc/readme.md Outdated
**Windows:**

```bash
cordova build android --release "--" --keystore="..\android.keystore" --storePassword=android --alias=mykey

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the keystore path to ../android.keystore for consistency.

Comment thread doc/readme.md Outdated
**Windows:**

```bash
cordova build android --release "--" --keystore="..\android.keystore" --storePassword=android --alias=mykey

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the keystore path to ../android.keystore for consistency.

Comment thread doc/readme.md Outdated

**Windows:**

```bash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use bash for Windows examples. Use text for an example shared by both Windows shells, or powershell / bat for separate shell-specific examples.

Comment thread doc/readme.md Outdated

**Windows:**

```bash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use bash for Windows examples. Use text for an example shared by both Windows shells, or powershell / bat for separate shell-specific examples.

Comment thread doc/readme.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change --buildConfig=..\myBuildConfig.json to --buildConfig="../myBuildConfig.json". The backslash used here was wrong.

Comment thread doc/readme.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change --buildConfig=..\myBuildConfig.json to --buildConfig="../myBuildConfig.json". The backslash used here was wrong.

@rishi919-rgb

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review @GitToTheHub!

I have addressed all the feedback in commit d8f4720:

  1. CLI Syntax Overview: Added separate Unix/macOS (bash) and Windows (text) examples showing "--" for platform options pass-through.
  2. Keystore Paths: Changed ..\android.keystore to forward-slash ../android.keystore across both Unix/macOS and Windows build examples for consistency and literal path correctness.
  3. Windows Code Block Language: Switched Windows examples from bash to text to remain neutral across Command Prompt and PowerShell.
  4. BuildConfig Paths: Updated --buildConfig=..\myBuildConfig.json to quoted forward-slash --buildConfig="../myBuildConfig.json" in both cordova build and cordova run examples.

@GitToTheHub
GitToTheHub merged commit 9ac7243 into apache:master Oct 11, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants