From ab1c7aeda0359fb174e4dbfdb7e117cc029eb329 Mon Sep 17 00:00:00 2001 From: Gerard Escalante Date: Tue, 11 Feb 2014 11:10:34 +0900 Subject: Windows compat fixes Changed usage of '/' as root dir. Stopped tests from wiping out environment. --- test/getOptions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/getOptions.js') 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) { -- cgit v1.2.3