diff --git a/lib/configuration/hooks/views/index.js b/lib/configuration/hooks/views/index.js index 5afa3e85e9..b0f27c5adb 100644 --- a/lib/configuration/hooks/views/index.js +++ b/lib/configuration/hooks/views/index.js @@ -54,9 +54,9 @@ module.exports = function (strapi) { // Finally, use the middleware. strapi.app.use(strapi.middlewares.views(path.resolve(strapi.config.appPath, strapi.config.paths.views), strapi.config.views)); - - cb(); } + + cb(); }, /** @@ -93,6 +93,7 @@ module.exports = function (strapi) { process.exit(1); } + strapi.log.info('`' + engine + '` successfully installed'); done(); }); } else { diff --git a/lib/configuration/hooks/waterline/index.js b/lib/configuration/hooks/waterline/index.js index 7de1f7b972..a01d3e54c1 100644 --- a/lib/configuration/hooks/waterline/index.js +++ b/lib/configuration/hooks/waterline/index.js @@ -285,6 +285,7 @@ module.exports = function (strapi) { process.exit(1); } + strapi.log.info('`' + adapter + '` successfully installed'); done(); }); } else { diff --git a/lib/restart.js b/lib/restart.js index 69ea0779c7..2ca7cfb337 100644 --- a/lib/restart.js +++ b/lib/restart.js @@ -18,7 +18,6 @@ const async = require('async'); module.exports = cb => { const self = this; - let runDone = null; console.log(); @@ -43,6 +42,7 @@ module.exports = cb => { // Callback. err => { + let count = 0; // Just in case there is an error. if (err) { @@ -59,18 +59,20 @@ module.exports = cb => { if (cluster.isMaster) { self.hooks.waterline.installation(); - ++runDone; + ++count; - if (_.isPlainObject(self.config.view)) { + if (_.isPlainObject(self.config.views) && !_.isBoolean(self.config.views)) { self.hooks.views.installation(); - ++runDone; + ++count; } } - const installed = _.after(runDone, () => { - self.log.warn('Application is restarting...'); - console.log(); + const installed = _.after(count, () => { + if (_.isPlainObject(strapi.config.reload) && !_.isEmpty(strapi.config.reload) && strapi.config.reload.workers > 0) { + self.log.warn('Application is restarting...'); + console.log(); + } // Teardown Waterline adapters and // reload the Waterline ORM. @@ -108,11 +110,11 @@ module.exports = cb => { self.hooks.waterline.reload(); }); - strapi.after('hook:waterline:installed', () => { + self.after('hook:waterline:installed', () => { installed(); }); - strapi.after('hook:views:installed', () => { + self.after('hook:views:installed', () => { installed(); }); });