mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-08 12:34:17 +00:00
Fix coverage on check_symlinks for windows
This commit is contained in:
parent
eff3eafcbb
commit
8d80d51cad
1 changed files with 4 additions and 1 deletions
|
|
@ -15,7 +15,10 @@ def check_symlinks(argv=None):
|
||||||
retv = 0
|
retv = 0
|
||||||
|
|
||||||
for filename in args.filenames:
|
for filename in args.filenames:
|
||||||
if os.path.islink(filename) and not os.path.exists(filename):
|
if (
|
||||||
|
os.path.islink(filename) and
|
||||||
|
not os.path.exists(filename)
|
||||||
|
): # pragma no cover (symlink support required)
|
||||||
print('{0}: Broken symlink'.format(filename))
|
print('{0}: Broken symlink'.format(filename))
|
||||||
retv = 1
|
retv = 1
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue