You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "breautek (via GitHub)" <gi...@apache.org> on 2025/12/17 00:08:37 UTC
[PR] fix(windows): Escape back-slashes for gradle config jdk path [cordova-android]
breautek opened a new pull request, #1876:
URL: https://github.com/apache/cordova-android/pull/1876
<!--
Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
http://cordova.apache.org/contribute/contribute_guidelines.html
Thanks!
-->
### Platforms affected
Windows
### Motivation and Context
<!-- Why is this change required? What problem does it solve? -->
<!-- If it fixes an open issue, please link to the issue here. -->
Fixes https://github.com/apache/cordova-android/issues/1842
### Description
<!-- Describe your changes in detail -->
Run the JDK path through a regex which matches all `\` occurrences, and replaces it with `\\` (or `"\\\\"` JS runtime value) so that they are escaped for the `config.properties` print out.
These values needs to be escaped properly for gradle to read them.
This primary affects windows users, but on unix if there are back-slashes, they should be escaped as well, so I figured there isn't a need for an OS guard.
### Testing
<!-- Please describe in detail how you tested your changes. -->
Ran `npm test` on windows.
### 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](https://help.github.com/articles/closing-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] fix(windows): Escape back-slashes for gradle config jdk path [cordova-android]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1876:
URL: https://github.com/apache/cordova-android/pull/1876#issuecomment-3662998569
## [Codecov](https://app.codecov.io/gh/apache/cordova-android/pull/1876?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `0%` with `3 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 58.50%. Comparing base ([`eaf875b`](https://app.codecov.io/gh/apache/cordova-android/commit/eaf875b0d6313648e7a0c3c87650b9bc7bf95fb5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c610025`](https://app.codecov.io/gh/apache/cordova-android/commit/c6100250c7baa7023df50885260b88f12c551605?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/cordova-android/pull/1876?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [lib/builders/ProjectBuilder.js](https://app.codecov.io/gh/apache/cordova-android/pull/1876?src=pr&el=tree&filepath=lib%2Fbuilders%2FProjectBuilder.js&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliL2J1aWxkZXJzL1Byb2plY3RCdWlsZGVyLmpz) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/cordova-android/pull/1876?src=pr&el=tree&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 #1876 +/- ##
==========================================
- Coverage 60.79% 58.50% -2.29%
==========================================
Files 23 23
Lines 4811 4813 +2
==========================================
- Hits 2925 2816 -109
- Misses 1886 1997 +111
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cordova-android/pull/1876?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] fix(windows): Escape back-slashes for gradle config jdk path [cordova-android]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek merged PR #1876:
URL: https://github.com/apache/cordova-android/pull/1876
--
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