fix(module/authenticator): do not display log if no webserver

This commit is contained in:
Anthony Laibe 2018-11-12 10:13:38 +00:00
parent 53154f8730
commit 97829c04f4
1 changed files with 6 additions and 3 deletions

View File

@ -72,9 +72,12 @@ class Authenticator {
let self = this;
this.events.once('outputDone', () => {
const {port, host} = this.embark.config.webServerConfig;
this.logger.info(__('Access the web backend with the following url: %s',
(`http://${host}:${port}/embark?token=${this.authToken}`.underline)));
const {port, host, enabled} = this.embark.config.webServerConfig;
if (enabled) {
this.logger.info(__('Access the web backend with the following url: %s',
(`http://${host}:${port}/embark?token=${this.authToken}`.underline)));
}
});
this.events.setCommandHandler('authenticator:authorize', (req, res, cb) => {