Skip to content

Commit

Permalink
fix: use cwd option when resolving git repo root (#1075)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Nicora <lucas.nicora@netcentric.biz>
  • Loading branch information
lucasenicora and Lucas Nicora committed Dec 24, 2021
1 parent 96a1a29 commit a230b03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resolveGitRepo.js
Expand Up @@ -54,7 +54,7 @@ export 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 gitRel = normalize(await execGit(['rev-parse', '--show-prefix'], { cwd }))
const gitDir = determineGitDir(normalize(cwd), gitRel)
const gitConfigDir = normalize(await resolveGitConfigDir(gitDir))

Expand Down

0 comments on commit a230b03

Please sign in to comment.