Skip to content

Commit 5b5cf84

Browse files
committed
use npx to invoke pnpm
1 parent 1aba8cb commit 5b5cf84

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

npm_mjs/management/commands/npm_install.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import hashlib
22
import json
33
import os
4-
import shutil
54
import time
65
from subprocess import call
76

@@ -54,12 +53,8 @@ def install_npm(force, stdout, post_npm_signal=True):
5453
set_last_run("npm_install", int(round(time.time())))
5554
call_command("create_package_json")
5655

57-
# Use pnpm instead of npm
58-
if shutil.which("pnpm") is None:
59-
stdout.write("Installing pnpm...")
60-
call(["npm", "install", "-g", "pnpm"], cwd=TRANSPILE_CACHE_PATH)
6156
stdout.write("Installing dependencies...")
62-
call(["pnpm", "install"], cwd=TRANSPILE_CACHE_PATH)
57+
call(["npx", "pnpm", "install"], cwd=TRANSPILE_CACHE_PATH)
6358

6459
# Update cache
6560
with open(cache_file, "w") as f:

0 commit comments

Comments
 (0)