summaryrefslogtreecommitdiff
path: root/chromium/third_party/node
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-29 10:46:47 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-11-02 12:02:10 +0000
commit99677208ff3b216fdfec551fbe548da5520cd6fb (patch)
tree476a4865c10320249360e859d8fdd3e01833b03a /chromium/third_party/node
parentc30a6232df03e1efbd9f3b226777b07e087a1122 (diff)
downloadqtwebengine-chromium-99677208ff3b216fdfec551fbe548da5520cd6fb.tar.gz
BASELINE: Update Chromium to 86.0.4240.124
Change-Id: Ide0ff151e94cd665ae6521a446995d34a9d1d644 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/node')
-rwxr-xr-xchromium/third_party/node/node.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/chromium/third_party/node/node.py b/chromium/third_party/node/node.py
index 8097e2c49ac..c68955eea9e 100755
--- a/chromium/third_party/node/node.py
+++ b/chromium/third_party/node/node.py
@@ -7,6 +7,7 @@ from os import path as os_path
import platform
import subprocess
import sys
+import os
def GetBinaryPath():
@@ -18,12 +19,26 @@ def GetBinaryPath():
def RunNode(cmd_parts, stdout=None):
- cmd = " ".join([GetBinaryPath()] + cmd_parts)
+ cmd = [GetBinaryPath()] + cmd_parts
process = subprocess.Popen(
- cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
+ cmd, cwd=os.getcwd(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
+ # TODO(crbug.com/1098074): Properly handle the returncode of
+ # process defined above. Right now, if the process would exit
+ # with a return code of non-zero, but the stderr is empty,
+ # we would still pass.
+ #
+ # However, we can't make this change here yet, as there are
+ # various presubmit scripts that rely on the runtime error
+ # and are unable to handle a `os.exit` call in this branch.
+ # These presubmit scripts need to spawn `subprocesses`
+ # themselves to handle the exitcode, before we can make the
+ # change here.
if stderr:
raise RuntimeError('%s failed: %s' % (cmd, stderr))
return stdout
+
+if __name__ == '__main__':
+ RunNode(sys.argv[1:])