Skip to content

Commit

Permalink
use argument passed instead of this.app
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanley Stuart committed Nov 11, 2014
1 parent 3d5b9a1 commit 6353e4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* jshint node: true */
module.exports = {
name: 'ember-cli-dotenv',
config: function(){
config: function(env, appConfig){
var path = require('path');
var fs = require('fs');
var dotenv = require('dotenv');
Expand All @@ -10,10 +10,10 @@ module.exports = {
var loadedConfig;
var config = {};
var hasOwn = Object.prototype.hasOwnProperty;
if (app.options.dotEnv && hasOwn.call(app.options.dotEnv, 'allow')){
console.warn("[EMBER-CLI-DOTENV] app.options.allow has been deprecated. Please use clientAllowedKeys instead. Support will be removed in the next major version");
if (appConfig.dotEnv && hasOwn.call(appConfig.dotEnv, 'allow')){
console.warn("[EMBER-CLI-DOTENV] appConfig.allow has been deprecated. Please use clientAllowedKeys instead. Support will be removed in the next major version");
}
var allowedKeys = (app.options.dotEnv && (app.options.dotEnv.clientAllowedKeys || app.options.dotEnv.allow) || []);
var allowedKeys = (appConfig.dotEnv && (appConfig.dotEnv.clientAllowedKeys || appConfig.dotEnv.allow) || []);

var configFilePath = path.join(project.root, '.env');

Expand Down

0 comments on commit 6353e4b

Please sign in to comment.