build: update npx.py to support npx@7 (#26662)
* build: update npx.py to support npx@7 * build: set npm_config_yes for all npx callsites
This commit is contained in:
parent
e455a79218
commit
b894151745
6 changed files with 17 additions and 6 deletions
|
@ -1,10 +1,13 @@
|
|||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def npx(*npx_args):
|
||||
npx_env = os.environ.copy()
|
||||
npx_env['npm_config_yes'] = 'true'
|
||||
call_args = [__get_executable_name()] + list(npx_args)
|
||||
subprocess.check_call(call_args)
|
||||
subprocess.check_call(call_args, env=npx_env)
|
||||
|
||||
|
||||
def __get_executable_name():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue