We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
1 parent 026aae0 commit 3a897ffCopy full SHA for 3a897ff
lib/resolveGitRepo.js
@@ -14,7 +14,8 @@ const debugLog = debug('lint-staged:resolveGitRepo')
14
* submodules and worktrees
15
*/
16
const resolveGitConfigDir = async (gitDir) => {
17
- const defaultDir = normalize(path.join(gitDir, '.git'))
+ // Get the real path in case it's a symlink
18
+ const defaultDir = normalize(await fs.realpath(path.join(gitDir, '.git')))
19
const stats = await fs.lstat(defaultDir)
20
// If .git is a directory, use it
21
if (stats.isDirectory()) return defaultDir
0 commit comments