Repository: cordova-ios Updated Branches: refs/heads/4.1.x b3794e278 -> c5c33bad3
CB-10673 fixed conflicting plugin install issue with overlapped <source-file> tag using --force option. This closes #199. Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/ef5eff4d Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/ef5eff4d Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/ef5eff4d Branch: refs/heads/4.1.x Commit: ef5eff4d3f849fd930d491e8e9f691c3d4fd10aa Parents: fa3830d Author: Byoungro So <[email protected]> Authored: Fri Feb 26 22:33:54 2016 -0800 Committer: Nikhil Khandelwal <[email protected]> Committed: Mon Mar 7 22:48:04 2016 -0800 ---------------------------------------------------------------------- .../scripts/cordova/lib/plugman/pluginHandlers.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/ef5eff4d/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js ---------------------------------------------------------------------- diff --git a/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js b/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js index d60738b..173ce14 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. - copyNewFile(plugin_dir, trueSrc, project_dir, destFile, link); - + if (options && options.force) { + 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.force) { + 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)); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
