There was an error while loading. Please reload this page.
2 parents 7f90039 + b0c7ae4 commit 47fb42cCopy full SHA for 47fb42c
1 file changed
pre_commit/languages/node.py
@@ -24,18 +24,20 @@ def _envdir(prefix, version):
24
25
26
def get_env_patch(venv): # pragma: windows no cover
27
+ lib_dir = 'lib'
28
if sys.platform == 'cygwin': # pragma: no cover
29
_, win_venv, _ = cmd_output('cygpath', '-w', venv)
30
install_prefix = r'{}\bin'.format(win_venv.strip())
31
elif sys.platform == 'win32': # pragma: no cover
32
install_prefix = bin_dir(venv)
33
+ lib_dir = 'Scripts'
34
else: # pragma: windows no cover
35
install_prefix = venv
36
return (
37
('NODE_VIRTUAL_ENV', venv),
38
('NPM_CONFIG_PREFIX', install_prefix),
39
('npm_config_prefix', install_prefix),
- ('NODE_PATH', os.path.join(venv, 'lib', 'node_modules')),
40
+ ('NODE_PATH', os.path.join(venv, lib_dir, 'node_modules')),
41
('PATH', (bin_dir(venv), os.pathsep, Var('PATH'))),
42
)
43
0 commit comments