diff --git a/components/plugin.js b/components/plugin.js index 3319c0d36..38cf0c48f 100644 --- a/components/plugin.js +++ b/components/plugin.js @@ -123,6 +123,9 @@ class Plugin { * Takes a plugin eg this or the result of Plugin.info and determines whether its a lando plugin or not */ static isValid(plugin) { + // if we are forcing installation then return true + if( plugin.config && plugin.config.force ) return true; + // if we are looking at a plugin instance then if (isClass(plugin.constructor) && plugin.constructor.name === 'Plugin') { return Object.keys(plugin.manifest).length > 0 || diff --git a/tasks/plugin-add.js b/tasks/plugin-add.js index 81ed14cb0..4c1875942 100644 --- a/tasks/plugin-add.js +++ b/tasks/plugin-add.js @@ -30,6 +30,11 @@ module.exports = lando => { array: true, default: [], }, + force: { + describe: 'Force install the plugin', + alias: ['f'], + type: 'boolean' + } }, run: async options => { const getPluginConfig = require('../utils/get-plugin-config'); @@ -42,6 +47,7 @@ module.exports = lando => { options.config = merge({}, [ getPluginConfig(lando.config.pluginConfigFile, lando.config.pluginConfig), lopts2Popts(options), + { force: !!options.force } ]); // reset Plugin static defaults for v3 purposes