Repository navigation
docs: improve CLI pass-through argument documentation for Windows (#1336) - #1530
Conversation
|
I would leave the documentation examples to use just |
2a20840 to
7ae7767
Compare
|
Thanks for the feedback @GitToTheHub! That makes complete sense. I have updated the changes accordingly:
The commit has been amended and force-pushed. |
7ae7767 to
9cf359a
Compare
|
Thanks again for the thorough review and helpful suggestions @GitToTheHub! I have updated the PR to incorporate all of your feedback:
The commit has been amended and force-pushed. |
There was a problem hiding this comment.
Hi I found one thing which should be changed. Also there exists a Cordova Command-line-interface (CLI) Commands article, which is generated from apache/cordova-cli/doc/readme.md. This should be changed accordingly.
| **Example (Windows):** | ||
|
|
||
| ```bash | ||
| cordova build android "--" --jvmargs='-Xmx4g' |
There was a problem hiding this comment.
The Windows JVM example uses single quotes. Command Prompt passes those quotes literally, so Cordova writes '-Xmx4g' into org.gradle.jvmargs, producing an invalid JVM argument. Use double quotes, which work in both Windows shells.
There was a problem hiding this comment.
Updated to double quotes (\-Xmx4g\) so it works across both Command Prompt and PowerShell without passing literal single quotes.
|
I added the articles you change in the description |
…ache#1336) - Keep standard CLI examples using unquoted -- separator - Add dedicated notes explaining the quotation requirement ("--") for Windows (Command Prompt and PowerShell) - Add Passing Platform-Specific Arguments section to the Cordova CLI guide with notes for Windows users - Fixes apache#1336
9cf359a to
8c7081d
Compare
|
Thanks @GitToTheHub!
|
|
Would be good if you could make a follow up PR on |
|
Done! I've opened the follow-up PR on \�pache/cordova-cli\ here: apache/cordova-cli#735 |
|
Nice, I will have a look on it |
…735) 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 (--) Relates to issue apache/cordova-docs#1336 and follows up on PR apache/cordova-docs#1530.
Platforms affected
Documentation / CLI (All platforms, specifically Windows Command Prompt and PowerShell, Android, iOS)
Motivation and Context
Fixes #1336
On Windows using Command Prompt or PowerShell, passing platform-specific arguments using the intermediate
--separator requires enclosing the--in quotation marks ("--"). Without quotes, PowerShell throws syntax/parse errors or treats--as a parameter terminator, leading to argument forwarding failures (as reported in apache/cordova-android#1671).Description
docs/en/latest/guide/cli/index.mddocs/en/latest/guide/platforms/android/index.mddocs/en/latest/guide/platforms/ios/index.mdFollowing reviewer feedback:
--separator (Unix/macOS).--separator must be enclosed in quotation marks ("--"), with accompanying examples.guide/cli/index.md) with concrete examples for Android (Gradle parameters, signing / packageType) and links to platform guides.Testing
npm test(npm run lint), passing with 0 errors.Checklist
(platform)if this change only applies to one platform (e.g.(android))