Skip to content

Commit b22ee6b

Browse files
Cimon Lucas (LCM)Cimon Lucas (LCM)
authored andcommitted
NodeJS hooks compatibilty fix for Cygwin
1 parent a3f7b40 commit b22ee6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pre_commit/languages/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
def get_env_patch(venv): # pragma: windows no cover
2020
return (
2121
('NODE_VIRTUAL_ENV', venv),
22-
('NPM_CONFIG_PREFIX', venv),
23-
('npm_config_prefix', venv),
22+
('NPM_CONFIG_PREFIX', os.path.join(venv, 'bin') if sys.platform == 'cygwin' else venv),
23+
('npm_config_prefix', os.path.join(venv, 'bin') if sys.platform == 'cygwin' else venv),
2424
('NODE_PATH', os.path.join(venv, 'lib', 'node_modules')),
2525
('PATH', (os.path.join(venv, 'bin'), os.pathsep, Var('PATH'))),
2626
)

0 commit comments

Comments
 (0)