Skip to content

Commit

Permalink
updated path.existsSync to use fs for node 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jgallen23 committed Apr 23, 2013
1 parent 9c8ab14 commit fb7abc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/confi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var fs = require('fs');
var path = require('path');
var aug = require('aug');
var cjson = require('cjson');
var exists = fs.existsSync || path.existsSync;
var cwd = process.cwd();

var defaults = {
Expand All @@ -12,7 +13,7 @@ var defaults = {

var readConfig = function(configPath, env) {
var f = path.join(configPath, env+".json");
if (path.existsSync(f)) {
if (exists(f)) {
return cjson.load(f);
}
return {};
Expand Down

0 comments on commit fb7abc6

Please sign in to comment.