You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ni...@apache.org on 2016/03/08 08:03:54 UTC

android commit: CB-10673 fixed conflicting plugin install issue with overlapped tag. Add --force flag. This closes #264.

Repository: cordova-android
Updated Branches:
  refs/heads/master bad0034e5 -> 18e81c4b9


CB-10673 fixed conflicting plugin install issue with overlapped <source-file> tag. Add --force flag. This closes #264.


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/18e81c4b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/18e81c4b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/18e81c4b

Branch: refs/heads/master
Commit: 18e81c4b904b8040e484da47b0036a3f400ff080
Parents: bad0034
Author: Byoungro So <by...@intel.com>
Authored: Fri Feb 26 22:32:37 2016 -0800
Committer: Nikhil Khandelwal <ni...@microsoft.com>
Committed: Mon Mar 7 23:02:19 2016 -0800

----------------------------------------------------------------------
 bin/templates/cordova/lib/pluginHandlers.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/18e81c4b/bin/templates/cordova/lib/pluginHandlers.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/pluginHandlers.js b/bin/templates/cordova/lib/pluginHandlers.js
index 1ee6b1f..83ccf37 100644
--- a/bin/templates/cordova/lib/pluginHandlers.js
+++ b/bin/templates/cordova/lib/pluginHandlers.js
@@ -31,7 +31,11 @@ var handlers = {
             if (!obj.src) throw new CordovaError('<source-file> element is missing "src" attribute for plugin: ' + plugin.id);
             if (!obj.targetDir) throw new CordovaError('<source-file> element is missing "target-dir" attribute for plugin: ' + plugin.id);
             var dest = path.join(obj.targetDir, path.basename(obj.src));
-            copyNewFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link));
+            if (options && options.force) {
+                copyFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link));
+            } else {
+                copyNewFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link));
+            }
         },
         uninstall:function(obj, plugin, project, options) {
             var dest = path.join(obj.targetDir, path.basename(obj.src));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org