diff --git a/lib/app/lower.js b/lib/app/lower.js index 55d428177..a2bc2b286 100644 --- a/lib/app/lower.js +++ b/lib/app/lower.js @@ -185,6 +185,7 @@ module.exports = function lower(options, cb) { // This should never happen because `err` is never passed in any of the async // functions above. Still, just to be safe, we set up an error log. sails.log.error('While lowering Sails app: received unexpected error:', err.stack); + return cb(err); } // If `sails._setNodeEnvAutomatically` is set, then we should revert it to what it was @@ -193,6 +194,9 @@ module.exports = function lower(options, cb) { if (sails._setNodeEnvAutomatically) { process.env['NODE_ENV'] = sails._originalNodeEnv; } + + return cb(); + });// });//