Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

disable global config when on windows

  • Loading branch information...
commit 9c326c89ac2ea9a92fc46b2ff9151c6890c4d97a 1 parent 8bc5148
Dominic Tarr authored August 21, 2012

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. 7  index.js
7  index.js
@@ -3,7 +3,8 @@ var argv = require('optimist').argv
3 3
 var cc   = require('config-chain')
4 4
 var join = require('path').join
5 5
 var etc = '/etc'
6  
-var home = process.platform === "win32"
  6
+var win = process.platform === "win32"
  7
+var home = win
7 8
            ? process.env.USERPROFILE
8 9
            : process.env.HOME
9 10
 
@@ -19,8 +20,8 @@ module.exports = function (name, defaults) {
19 20
     join(home, '.' + name, 'config'),
20 21
     join(home, '.config', name),
21 22
     join(home, '.config', name, 'config'),
22  
-    join(etc, name + 'rc'),
23  
-    join(etc, name, 'config'),
  23
+    win ? null : join(etc, name + 'rc'),
  24
+    win ? null : join(etc, name, 'config'),
24 25
     defaults
25 26
   ).snapshot
26 27
 

0 notes on commit 9c326c8

Please sign in to comment.
Something went wrong with that request. Please try again.