Skip in case of 'plugin' command only on not found error

This commit is contained in:
Mariusz Nowak 2019-09-06 13:50:41 +02:00
parent b2cf1025c7
commit 16f358115a
No known key found for this signature in database
GPG Key ID: B1FBDA8A182B03F2

View File

@ -106,10 +106,8 @@ class PluginManager {
try {
Plugin = require(pluginPath); // eslint-disable-line global-require
} catch (error) {
if (this.cliCommands[0] === 'plugin') {
return;
}
if (isModuleNotFoundError(error, pluginPath)) {
if (this.cliCommands[0] === 'plugin') return;
// Plugin not installed
if (this.cliOptions.help) {