Skip to content

Commit a230b03

Browse files
lucasenicoraLucas Nicora
and
Lucas Nicora
authoredDec 24, 2021
fix: use cwd option when resolving git repo root (#1075)
Co-authored-by: Lucas Nicora <lucas.nicora@netcentric.biz>
1 parent 96a1a29 commit a230b03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/resolveGitRepo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const resolveGitRepo = async (cwd = process.cwd()) => {
5454

5555
// read the path of the current directory relative to the top-level directory
5656
// don't read the toplevel directly, it will lead to an posix conform path on non posix systems (cygwin)
57-
const gitRel = normalize(await execGit(['rev-parse', '--show-prefix']))
57+
const gitRel = normalize(await execGit(['rev-parse', '--show-prefix'], { cwd }))
5858
const gitDir = determineGitDir(normalize(cwd), gitRel)
5959
const gitConfigDir = normalize(await resolveGitConfigDir(gitDir))
6060

0 commit comments

Comments
 (0)
Please sign in to comment.