From 1ad263a5c03d0f3fd90f2dffd0d9083f0ef8112e Mon Sep 17 00:00:00 2001 From: Michael Belousov Date: Tue, 24 Mar 2020 00:57:38 -0400 Subject: [PATCH] fix: use `path.join` and `normalize` to improve msys compatibility in resolveGitRepo --- lib/resolveGitRepo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resolveGitRepo.js b/lib/resolveGitRepo.js index 6d71960a0..886e2abe2 100644 --- a/lib/resolveGitRepo.js +++ b/lib/resolveGitRepo.js @@ -16,7 +16,7 @@ const fsLstat = promisify(fs.lstat) * submodules and worktrees */ const resolveGitConfigDir = async gitDir => { - const defaultDir = path.resolve(gitDir, '.git') + const defaultDir = normalize(path.join(gitDir, '.git')) const stats = await fsLstat(defaultDir) // If .git is a directory, use it if (stats.isDirectory()) return defaultDir