Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6c62945 + 8cfe8e5 commit 92ce2dcCopy full SHA for 92ce2dc
1 file changed
pre_commit/git.py
@@ -201,7 +201,10 @@ def check_for_cygwin_mismatch() -> None:
201
"""See https://github.com/pre-commit/pre-commit/issues/354"""
202
if sys.platform in ('cygwin', 'win32'): # pragma: no cover (windows)
203
is_cygwin_python = sys.platform == 'cygwin'
204
- toplevel = get_root()
+ try:
205
+ toplevel = get_root()
206
+ except FatalError: # skip the check if we're not in a git repo
207
+ return
208
is_cygwin_git = toplevel.startswith('/')
209
210
if is_cygwin_python ^ is_cygwin_git:
0 commit comments