From f861d8d17d966809b6cd7ae338c289a125d0e3b4 Mon Sep 17 00:00:00 2001 From: tkalmar <971164+tkalmar@users.noreply.github.com> Date: Sun, 10 Oct 2021 19:31:37 +0200 Subject: [PATCH] fix: unbreak windows by correctly normalizing cwd (#1029) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Thomas Kalmár --- lib/resolveGitRepo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resolveGitRepo.js b/lib/resolveGitRepo.js index 79dfff61d..6fdb3bd30 100644 --- a/lib/resolveGitRepo.js +++ b/lib/resolveGitRepo.js @@ -56,7 +56,7 @@ const resolveGitRepo = async (cwd = process.cwd()) => { // read the path of the current directory relative to the top-level directory // don't read the toplevel directly, it will lead to an posix conform path on non posix systems (cygwin) const gitRel = normalize(await execGit(['rev-parse', '--show-prefix'])) - const gitDir = determineGitDir(cwd, gitRel) + const gitDir = determineGitDir(normalize(cwd), gitRel) const gitConfigDir = normalize(await resolveGitConfigDir(gitDir)) debugLog('Resolved git directory to be `%s`', gitDir)