Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions components/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down
6 changes: 6 additions & 0 deletions tasks/plugin-add.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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
Expand Down