Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2da2c4

Browse files
authored
Merge pull request #801 from pre-commit/node_lives_again
Revert "Merge pull request #799 from pre-commit/temporarily_skip_npm_windows"
2 parents 99972df + 4f419fd commit f2da2c4

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

testing/util.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,16 @@ def cmd_output_mocked_pre_commit_home(*args, **kwargs):
4848
def broken_deep_listdir(): # pragma: no cover (platform specific)
4949
if sys.platform != 'win32':
5050
return False
51-
return True # see #798
51+
try:
52+
os.listdir(str('\\\\?\\') + os.path.abspath(str('.')))
53+
except OSError:
54+
return True
55+
try:
56+
os.listdir(b'\\\\?\\C:' + b'\\' * 300)
57+
except TypeError:
58+
return True
59+
except OSError:
60+
return False
5261

5362

5463
xfailif_broken_deep_listdir = pytest.mark.xfail(

0 commit comments

Comments
 (0)