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.
@@ -14,7 +14,8 @@ const debugLog = debug('lint-staged:resolveGitRepo')
14
14
  * submodules and worktrees
15
15
  */
16
16
  const resolveGitConfigDir = async (gitDir) => {
17
- const defaultDir = normalize(path.join(gitDir, '.git'))
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lint-staged",
3
- "version": "12.3.1",
3
+ "version": "12.3.2",
4
4
  "description": "Lint files staged by git",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/okonet/lint-staged",