getGitCommit: allow git worktrees
Change the short circuit logic to only test for a .git path. With worktrees that's just a file, not a directory and we really shouldn't play git anyhow and not rely on implementation details.
This commit is contained in:
parent
304d207820
commit
1c08b6dce6
@ -73,7 +73,7 @@ function getGitCommit() {
|
||||
return _gitCommit;
|
||||
}
|
||||
|
||||
if (!fs.existsSync(path.resolve(__dirname, "..", ".git", "HEAD"))) {
|
||||
if (!fs.existsSync(path.resolve(__dirname, "..", ".git"))) {
|
||||
_gitCommit = null;
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user