Skip to content

Commit d71a75f

Browse files
committed
Run npm install before npm install -g
1 parent 3cb35e8 commit d71a75f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pre_commit/languages/node.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def install_environment(prefix, version, additional_dependencies):
6363
cmd_output(*cmd)
6464

6565
with in_env(prefix, version):
66+
# https://npm.community/t/npm-install-g-git-vs-git-clone-cd-npm-install-g/5449
67+
# install as if we installed from git
68+
helpers.run_setup_cmd(prefix, ('npm', 'install'))
6669
helpers.run_setup_cmd(
6770
prefix,
6871
('npm', 'install', '-g', '.') + additional_dependencies,

0 commit comments

Comments
 (0)