Hide npm output by default (#431)
Fixes: https://github.com/emscripten-core/emscripten/issues/10291
This commit is contained in:
1
.flake8
1
.flake8
@@ -9,6 +9,7 @@ exclude =
|
|||||||
./gnu
|
./gnu
|
||||||
./upstream
|
./upstream
|
||||||
./fastcomp
|
./fastcomp
|
||||||
|
./fastcomp-clang
|
||||||
./releases
|
./releases
|
||||||
./clang
|
./clang
|
||||||
./emscripten
|
./emscripten
|
||||||
|
|||||||
12
emsdk.py
12
emsdk.py
@@ -1276,7 +1276,17 @@ def emscripten_npm_install(tool, directory):
|
|||||||
npm = os.path.join(node_path, 'npm' + ('.cmd' if WINDOWS else ''))
|
npm = os.path.join(node_path, 'npm' + ('.cmd' if WINDOWS else ''))
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env["PATH"] = node_path + os.pathsep + env["PATH"]
|
env["PATH"] = node_path + os.pathsep + env["PATH"]
|
||||||
subprocess.check_call([npm, 'ci', '--production'], cwd=directory, env=env)
|
print('Running post-install step: npm ci ...')
|
||||||
|
try:
|
||||||
|
subprocess.check_output(
|
||||||
|
[npm, 'ci', '--production'],
|
||||||
|
cwd=directory, stderr=subprocess.STDOUT, env=env,
|
||||||
|
universal_newlines=True)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
print('Error running %s:\n%s' % (e.cmd, e.output))
|
||||||
|
return False
|
||||||
|
|
||||||
|
print('Done running: npm ci')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user