From b70089f1eb488e34a2c0d619379b67fb25f4fd81 Mon Sep 17 00:00:00 2001 From: jonschlinkert Date: Thu, 8 Dec 2016 09:57:31 -0500 Subject: [PATCH] just return the path --- index.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index db197ff..01f263c 100644 --- a/index.js +++ b/index.js @@ -106,14 +106,8 @@ parse.resolve = function resolve(options) { // `git-config-path` determine the path var type = isGlobal ? 'global' : null; var opts = extend({path: configPath(type)}, options); - if (opts.path && exists(opts.path)) { - return opts.path; - } - - if (opts.cwd && opts.path) { - return path.resolve(opts.cwd, opts.path); - } - return opts.path && path.resolve(opts.path); + var cwd = opts.cwd || process.cwd(); + return path.resolve(cwd, opts.path); }; /**