Skip to content

Commit

Permalink
Workaround linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rgajason authored and Jguer committed Apr 30, 2021
1 parent 4055052 commit 6547b5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ggshield/git_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def get_git_path(cwd: str) -> str:
# insensitive filesystems but detection is problematic
git_path = os.path.abspath(git_path)
cwd = os.path.abspath(cwd)
path_env = list(map(os.path.abspath, os.environ.get("PATH", "").split(os.pathsep)))
path_env = [
os.path.abspath(p) for p in os.environ.get("PATH", "").split(os.pathsep)
]

# git was found - ignore git in cwd if cwd not in PATH
if cwd == os.path.dirname(git_path) and cwd not in path_env:
Expand Down

0 comments on commit 6547b5c

Please sign in to comment.