do async plugin init in load all plugins

This commit is contained in:
Daniel Schep 2019-09-16 14:59:59 -04:00
parent 9748b4e124
commit ad0252dec3
3 changed files with 2 additions and 3 deletions

View File

@ -75,8 +75,7 @@ class Serverless {
})
.then(() => {
// load all plugins
this.pluginManager.loadAllPlugins(this.service.plugins);
return this.pluginManager.asyncPluginInit();
return this.pluginManager.loadAllPlugins(this.service.plugins);
})
.then(() => {
// give the CLI the plugins and commands so that it can print out

View File

@ -185,7 +185,6 @@ describe('Serverless', () => {
return serverless.init().then(() => {
expect(loadAllPluginsStub.calledOnce).to.equal(true);
expect(asyncPluginInitStub.calledOnce).to.equal(true);
expect(updateAutocompleteCacheFileStub.calledOnce).to.equal(true);
});
});

View File

@ -96,6 +96,7 @@ class PluginManager {
this.loadCorePlugins();
this.loadServicePlugins(servicePlugins);
this.loadEnterprisePlugin();
return this.asyncPluginInit();
}
loadPlugins(plugins) {