You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "rishi919-rgb (via GitHub)" <gi...@apache.org> on 2026/10/11 09:40:30 UTC

[PR] doc: document Windows quoting requirement for pass-through arguments [cordova-cli]

rishi919-rgb opened a new pull request, #735:
URL: https://github.com/apache/cordova-cli/pull/735

   ### 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](https://cordova.apache.org/docs/en/latest/reference/cordova-cli/index.html) 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)
   - [x] Documentation improvement
   
   ## Checklist:
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [x] I added automated test coverage as appropriate for this change
   - [x] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [x] 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)
   - [x] I've updated the documentation if necessary
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] doc: document Windows quoting requirement for pass-through arguments [cordova-cli]

Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub merged PR #735:
URL: https://github.com/apache/cordova-cli/pull/735


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] doc: document Windows quoting requirement for pass-through arguments [cordova-cli]

Posted by "rishi919-rgb (via GitHub)" <gi...@apache.org>.
rishi919-rgb commented on PR #735:
URL: https://github.com/apache/cordova-cli/pull/735#issuecomment-6108005543

   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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] doc: document Windows quoting requirement for pass-through arguments [cordova-cli]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #735:
URL: https://github.com/apache/cordova-cli/pull/735#issuecomment-6107769465

   ## [Codecov](https://app.codecov.io/gh/apache/cordova-cli/pull/735?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 72.90%. Comparing base ([`55dcdd6`](https://app.codecov.io/gh/apache/cordova-cli/commit/55dcdd61c0aae4326c3fe0fc238c4cfc79606919?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b8a3029`](https://app.codecov.io/gh/apache/cordova-cli/commit/b8a302910b755f0abe4f64f23e6ec74786b3a36f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #735   +/-   ##
   =======================================
     Coverage   72.90%   72.90%           
   =======================================
     Files           3        3           
     Lines         620      620           
   =======================================
     Hits          452      452           
     Misses        168      168           
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/cordova-cli/pull/735?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] doc: document Windows quoting requirement for pass-through arguments [cordova-cli]

Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on code in PR #735:
URL: https://github.com/apache/cordova-cli/pull/735#discussion_r4241129686


##########
doc/readme.md:
##########


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



##########
doc/readme.md:
##########
@@ -431,10 +441,18 @@ cordova build android --release --buildConfig=..\myBuildConfig.json
 
 - Build for `android` platform in release mode and pass custom platform options to android build process:
 
+**Unix/macOS:**
+
 ```bash
 cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey

Review Comment:
   The same here, change the keystore path `../android.keystore`.



##########
doc/readme.md:
##########
@@ -122,10 +124,18 @@ Additionally, it includes an example showcasing the usage of specific options pr
 
 7. Build Project for Android in Release Mode with Signing Parameters
 
+    **Unix/macOS:**
+
     ```bash
     cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey

Review Comment:
   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.



##########
doc/readme.md:
##########
@@ -122,10 +124,18 @@ Additionally, it includes an example showcasing the usage of specific options pr
 
 7. Build Project for Android in Release Mode with Signing Parameters
 
+    **Unix/macOS:**
+
     ```bash
     cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey
     ```
 
+    **Windows:**
+
+    ```bash
+    cordova build android --release "--" --keystore="..\android.keystore" --storePassword=android --alias=mykey

Review Comment:
   Change the keystore path to `../android.keystore` for consistency.



##########
doc/readme.md:
##########
@@ -122,10 +124,18 @@ Additionally, it includes an example showcasing the usage of specific options pr
 
 7. Build Project for Android in Release Mode with Signing Parameters
 
+    **Unix/macOS:**
+
     ```bash
     cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey
     ```
 
+    **Windows:**
+
+    ```bash

Review Comment:
   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.



##########
doc/readme.md:
##########


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



##########
doc/readme.md:
##########
@@ -431,10 +441,18 @@ cordova build android --release --buildConfig=..\myBuildConfig.json
 
 - Build for `android` platform in release mode and pass custom platform options to android build process:
 
+**Unix/macOS:**
+
 ```bash
 cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey
 ```
 
+**Windows:**
+
+```bash
+cordova build android --release "--" --keystore="..\android.keystore" --storePassword=android --alias=mykey

Review Comment:
   Change the keystore path to `../android.keystore` for consistency.



##########
doc/readme.md:
##########


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



##########
doc/readme.md:
##########
@@ -431,10 +441,18 @@ cordova build android --release --buildConfig=..\myBuildConfig.json
 
 - Build for `android` platform in release mode and pass custom platform options to android build process:
 
+**Unix/macOS:**
+
 ```bash
 cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey
 ```
 
+**Windows:**
+
+```bash

Review Comment:
   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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org