mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
CB-10673 fixed conflicting plugin install issue with overlapped <source-file> tag. Add --force flag. This closes #264.
This commit is contained in:
parent
bad0034e5d
commit
18e81c4b90
6
bin/templates/cordova/lib/pluginHandlers.js
vendored
6
bin/templates/cordova/lib/pluginHandlers.js
vendored
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user