Skip to content
Permalink
Browse files
CB-10569 Mobilespec doesn't use edge versions of plugins
  • Loading branch information
alsorokin committed Feb 9, 2016
1 parent 44e6f92 commit fe36cf5e0c9218454848b63a29cde9ddc21a2cc0
Showing 1 changed file with 11 additions and 3 deletions.
@@ -59,7 +59,15 @@ function pluginAdd(pluginName, searchPath, extraFlags) {
if (!pluginName) {
return;
}
var command = cli + ' plugin add ' + pluginName + ' --searchpath ' + searchPath;
if (!searchPath || typeof searchPath !== "string") {
searchPath = '';
}
var command;
if (fs.existsSync(path.join(searchPath, pluginName, 'plugin.xml'))) {
command = cli + ' plugin add ' + path.join(searchPath, pluginName);
} else {
command = cli + ' plugin add ' + pluginName + ' --searchpath ' + searchPath;
}
if (extraFlags) {
command += extraFlags;
}
@@ -499,8 +507,8 @@ function pluginIdToDirName(id) {
function installPlugins() {
var plugins = DEFAULT_PLUGINS;
if (argv.plugins) {
plugins = argv.plugins.split(" ").filter(function (item) {
return item !== "";
plugins = argv.plugins.split(" ").filter(function (item) {
return item !== "";
});
}

0 comments on commit fe36cf5

Please sign in to comment.