lint-staged 8.2.0 → 8.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lint-staged",
3
- "version": "8.2.0",
3
+ "version": "8.2.1",
4
4
  "description": "Lint files staged by git",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/okonet/lint-staged",
@@ -5,6 +5,9 @@ const path = require('path')
5
5
 
6
6
  module.exports = async function resolveGitDir(options) {
7
7
  try {
8
+ // git cli uses GIT_DIR to fast track its response however it might be set to a different path
9
+ // depending on where the caller initiated this from, hence clear GIT_DIR
10
+ delete process.env.GIT_DIR
8
11
  const gitDir = await execGit(['rev-parse', '--show-toplevel'], options)
9
12
  return path.normalize(gitDir)
10
13
  } catch (error) {