Repository navigation
doc: document Windows quoting requirement for pass-through arguments - #735
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
|
||
| ## CLI Syntax | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
Add here that this is a Unix/macOS example. Add a windows sample accordingly.
| **Unix/macOS:** | ||
|
|
||
| ```bash | ||
| cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey |
There was a problem hiding this 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.
| **Unix/macOS:** | ||
|
|
||
| ```bash | ||
| cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey |
There was a problem hiding this comment.
The same here, change the keystore path ../android.keystore.
| **Windows:** | ||
|
|
||
| ```bash | ||
| cordova build android --release "--" --keystore="..\android.keystore" --storePassword=android --alias=mykey |
There was a problem hiding this comment.
Change the keystore path to ../android.keystore for consistency.
| **Windows:** | ||
|
|
||
| ```bash | ||
| cordova build android --release "--" --keystore="..\android.keystore" --storePassword=android --alias=mykey |
There was a problem hiding this comment.
Change the keystore path to ../android.keystore for consistency.
|
|
||
| **Windows:** | ||
|
|
||
| ```bash |
There was a problem hiding this 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.
|
|
||
| **Windows:** | ||
|
|
||
| ```bash |
There was a problem hiding this 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.
There was a problem hiding this comment.
Can you change --buildConfig=..\myBuildConfig.json to --buildConfig="../myBuildConfig.json". The backslash used here was wrong.
There was a problem hiding this comment.
Can you change --buildConfig=..\myBuildConfig.json to --buildConfig="../myBuildConfig.json". The backslash used here was wrong.
|
Thanks for the thorough review @GitToTheHub! I have addressed all the feedback in commit d8f4720:
|
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 (--):--pass-through separator must be enclosed in quotation marks ("--") so that the shell forwards the arguments to platform build scripts correctly.--) and Windows ("--") for release builds with signing parameters.cordova buildandcordova runoption tables and examples:<platformOpts>table row to note"--"on Windows shells.cordova buildexamples 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 inapache/cordova-docswas updated in PR apache/cordova-docs#1530, and reviewer @GitToTheHub requested updatingdoc/readme.mdinapache/cordova-clito keep the auto-generated CLI Reference documentation synchronized.How Has This Been Tested?
Testing
npm testlocally:eslint .passed with 0 errors.doc/readme.md.Types of changes
Checklist:
Checklist
(platform)if this change only applies to one platform (e.g.(android))