Skip to content

Commit

Permalink
Revert "Load .sailsrc and env var config when Sails is loaded progr…
Browse files Browse the repository at this point in the history
…ammatically"

This reverts commit 13163b0.  This would be a breaking change with possible unintended consequences -- if you want to do this, you can just do `sails.load(require('rc'))`.
  • Loading branch information
sgress454 committed Oct 4, 2016
1 parent 7eb6af6 commit c017084
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/app/configuration/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var _ = require('lodash');
var async = require('async');
var CaptainsLog = require('captains-log');
var path = require('path');
var rconf = require('./rc');


module.exports = function(sails) {
Expand Down Expand Up @@ -45,14 +44,10 @@ module.exports = function(sails) {
*/
mapOverrides: function(cb) {

// If there's no sails config yet, it means we lifted programmatically,
// so we didn't get the `rc` stuff. Let's load it in now.
if (_.isEmpty(sails.config)) {
sails.config = rconf || {};
}

// Clone the `overrides` that were passed in.
var overrides = _.cloneDeep(sails.config);
var overrides = _.cloneDeep(sails.config || {});

// TODO: bring the rconf stuff from bin/sails-lift in here

// Command-line arguments take highest precedence
// overrides = _.merge(overrides, argv);
Expand Down

0 comments on commit c017084

Please sign in to comment.