aboutsummaryrefslogtreecommitdiff
path: root/test/getOptions.js
diff options
context:
space:
mode:
authorGerard Escalante <[email protected]>2014-02-11 11:10:34 +0900
committerGerard Escalante <[email protected]>2014-02-11 11:10:34 +0900
commitab1c7aeda0359fb174e4dbfdb7e117cc029eb329 (patch)
treefc7a02bb26f448233c9626704d499cca30c6d327 /test/getOptions.js
parent7f7dad83d26e0d3c3326c260926acfcb6e05fa58 (diff)
downloadnode-coveralls-ab1c7aeda0359fb174e4dbfdb7e117cc029eb329.tar.xz
node-coveralls-ab1c7aeda0359fb174e4dbfdb7e117cc029eb329.zip
Windows compat fixes
Changed usage of '/' as root dir. Stopped tests from wiping out environment.
Diffstat (limited to 'test/getOptions.js')
-rw-r--r--test/getOptions.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/getOptions.js b/test/getOptions.js
index f9b2494..9e844ec 100644
--- a/test/getOptions.js
+++ b/test/getOptions.js
@@ -301,7 +301,7 @@ function ensureLocalGitContext(options) {
var fs = require('fs');
var baseDir = process.cwd(), dir = baseDir, gitDir;
- while ('/' !== dir) {
+ while (path.resolve('/') !== dir) {
gitDir = path.join(dir, '.git');
var existsSync = fs.existsSync || path.existsSync;
if (existsSync(path.join(gitDir, 'HEAD')))
@@ -311,7 +311,7 @@ function ensureLocalGitContext(options) {
}
options = options || {};
- var synthetic = '/' === dir;
+ var synthetic = path.resolve('/') === dir;
var gitHead, content, branch, id, wrapUp = function() {};
if (synthetic) {