From a666932219e1547321d2b41a0540fc4038b9b4d9 Mon Sep 17 00:00:00 2001 From: Byoungro So Date: Fri, 26 Feb 2016 22:33:54 -0800 Subject: [PATCH 1/3] CB-10673 fixed conflicting plugin install issue with overlapped tag --- bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js b/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js index d60738b705..e7fd4048ab 100644 --- a/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js +++ b/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js @@ -201,7 +201,7 @@ function installHelper(type, obj, plugin_dir, project_dir, plugin_id, options, p if (link) { var trueSrc = fs.realpathSync(srcFile); // Create a symlink in the expected place, so that uninstall can use it. - copyNewFile(plugin_dir, trueSrc, project_dir, destFile, link); + copyFile(plugin_dir, trueSrc, project_dir, destFile, link); // Xcode won't save changes to a file if there is a symlink involved. // Make the Xcode reference the file directly. From 922c5c1d563db780734315e634b7d0028a3b306d Mon Sep 17 00:00:00 2001 From: Byoungro So Date: Wed, 2 Mar 2016 21:58:43 -0800 Subject: [PATCH 2/3] CB-10673 force copying on --force-copying-src --- .../scripts/cordova/lib/plugman/pluginHandlers.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js b/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js index e7fd4048ab..b840451b0a 100644 --- a/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js +++ b/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js @@ -201,15 +201,22 @@ function installHelper(type, obj, plugin_dir, project_dir, plugin_id, options, p if (link) { var trueSrc = fs.realpathSync(srcFile); // Create a symlink in the expected place, so that uninstall can use it. - copyFile(plugin_dir, trueSrc, project_dir, destFile, link); - + if (options && options.forceCopyingSrc) { + copyFile(plugin_dir, trueSrc, project_dir, destFile, link); + } else { + copyNewFile(plugin_dir, trueSrc, project_dir, destFile, link); + } // Xcode won't save changes to a file if there is a symlink involved. // Make the Xcode reference the file directly. // Note: Can't use path.join() here since it collapses 'Plugins/..', and xcode // library special-cases Plugins/ prefix. project_ref = 'Plugins/' + fixPathSep(path.relative(fs.realpathSync(project.plugins_dir), trueSrc)); } else { - copyNewFile(plugin_dir, srcFile, project_dir, destFile, link); + if (options && options.forceCopyingSrc) { + copyFile(plugin_dir, srcFile, project_dir, destFile, link); + } else { + copyNewFile(plugin_dir, srcFile, project_dir, destFile, link); + } project_ref = 'Plugins/' + fixPathSep(path.relative(project.plugins_dir, destFile)); } From fc2e2cf6774a8a6626bbed07f1a5404392234b89 Mon Sep 17 00:00:00 2001 From: Byoungro So Date: Thu, 3 Mar 2016 23:08:37 -0800 Subject: [PATCH 3/3] CB-10673 changed the option name to --force --- bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js b/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js index b840451b0a..173ce1411f 100644 --- a/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js +++ b/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js @@ -201,7 +201,7 @@ function installHelper(type, obj, plugin_dir, project_dir, plugin_id, options, p if (link) { var trueSrc = fs.realpathSync(srcFile); // Create a symlink in the expected place, so that uninstall can use it. - if (options && options.forceCopyingSrc) { + if (options && options.force) { copyFile(plugin_dir, trueSrc, project_dir, destFile, link); } else { copyNewFile(plugin_dir, trueSrc, project_dir, destFile, link); @@ -212,7 +212,7 @@ function installHelper(type, obj, plugin_dir, project_dir, plugin_id, options, p // library special-cases Plugins/ prefix. project_ref = 'Plugins/' + fixPathSep(path.relative(fs.realpathSync(project.plugins_dir), trueSrc)); } else { - if (options && options.forceCopyingSrc) { + if (options && options.force) { copyFile(plugin_dir, srcFile, project_dir, destFile, link); } else { copyNewFile(plugin_dir, srcFile, project_dir, destFile, link);