Permalink
Browse files

disable global config when on windows

  • Loading branch information...
1 parent 8bc5148 commit 9c326c89ac2ea9a92fc46b2ff9151c6890c4d97a @dominictarr committed Aug 21, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 index.js
View
@@ -3,7 +3,8 @@ var argv = require('optimist').argv
var cc = require('config-chain')
var join = require('path').join
var etc = '/etc'
-var home = process.platform === "win32"
+var win = process.platform === "win32"
+var home = win
? process.env.USERPROFILE
: process.env.HOME
@@ -19,8 +20,8 @@ module.exports = function (name, defaults) {
join(home, '.' + name, 'config'),
join(home, '.config', name),
join(home, '.config', name, 'config'),
- join(etc, name + 'rc'),
- join(etc, name, 'config'),
+ win ? null : join(etc, name + 'rc'),
+ win ? null : join(etc, name, 'config'),
defaults
).snapshot

0 comments on commit 9c326c8

Please sign in to comment.