lint-staged 12.3.1 → 12.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/resolveGitRepo.js +2 -1
- package/package.json +1 -1
package/lib/resolveGitRepo.js
CHANGED
|
@@ -14,7 +14,8 @@ const debugLog = debug('lint-staged:resolveGitRepo')
|
|
|
14
14
|
* submodules and worktrees
|
|
15
15
|
*/
|
|
16
16
|
const resolveGitConfigDir = async (gitDir) => {
|
|
17
|
-
|
|
17
|
+
// Get the real path in case it's a symlink
|
|
18
|
+
const defaultDir = normalize(await fs.realpath(path.join(gitDir, '.git')))
|
|
18
19
|
const stats = await fs.lstat(defaultDir)
|
|
19
20
|
// If .git is a directory, use it
|
|
20
21
|
if (stats.isDirectory()) return defaultDir
|