This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-common.git
The following commit(s) were added to refs/heads/master by this push:
new 406e1a2 fix(ConfigFile): Normalize globbed file paths (#135)
406e1a2 is described below
commit 406e1a22853863905176b1b31efd57686cf586c7
Author: Raphael von der GrĂ¼n <[email protected]>
AuthorDate: Sun Mar 15 03:07:34 2020 +0100
fix(ConfigFile): Normalize globbed file paths (#135)
---
spec/ConfigChanges/ConfigChanges.spec.js | 2 +-
src/ConfigChanges/ConfigFile.js | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/spec/ConfigChanges/ConfigChanges.spec.js
b/spec/ConfigChanges/ConfigChanges.spec.js
index 5f97ba5..cc77eab 100644
--- a/spec/ConfigChanges/ConfigChanges.spec.js
+++ b/spec/ConfigChanges/ConfigChanges.spec.js
@@ -472,7 +472,7 @@ describe('config-changes module', function () {
var munger = new configChanges.PlatformMunger('ios', temp,
platformJson, pluginInfoProvider);
munger.process(plugins_dir);
- expect(spy).toHaveBeenCalledWith(path.join(temp, 'SampleApp',
'SampleApp-Info.plist').replace(/\\/g, '/'), 'utf8');
+ expect(spy).toHaveBeenCalledWith(path.join(temp, 'SampleApp',
'SampleApp-Info.plist'), 'utf8');
});
it('Test 026 : should move successfully installed plugins from
queue to installed plugins section, and include/retain vars if applicable',
function () {
fs.copySync(android_two_project, temp);
diff --git a/src/ConfigChanges/ConfigFile.js b/src/ConfigChanges/ConfigFile.js
index c1ea226..6b476d6 100644
--- a/src/ConfigChanges/ConfigFile.js
+++ b/src/ConfigChanges/ConfigFile.js
@@ -167,7 +167,9 @@ function resolveConfigFilePath (project_dir, platform,
file) {
if (file.includes('*')) {
// handle wildcards in targets using glob.
- matches = modules.glob.sync(path.join(project_dir, '**', file));
+ matches = modules.glob.sync(path.join(project_dir, '**', file))
+ .map(p => path.normalize(p));
+
if (matches.length) filepath = matches[0];
// [CB-5989] multiple Info.plist files may exist. default to
$PROJECT_NAME-Info.plist
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]