summaryrefslogtreecommitdiff
path: root/source/xap/mozilla-firefox/firefox.node.py.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/mozilla-firefox/firefox.node.py.patch')
-rw-r--r--source/xap/mozilla-firefox/firefox.node.py.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/source/xap/mozilla-firefox/firefox.node.py.patch b/source/xap/mozilla-firefox/firefox.node.py.patch
new file mode 100644
index 00000000..11e2b843
--- /dev/null
+++ b/source/xap/mozilla-firefox/firefox.node.py.patch
@@ -0,0 +1,46 @@
+
+diff --git a/python/mozbuild/mozbuild/action/node.py b/python/mozbuild/mozbuild/action/node.py
+--- a/python/mozbuild/mozbuild/action/node.py
++++ b/python/mozbuild/mozbuild/action/node.py
+@@ -47,24 +47,35 @@ def execute_node_cmd(node_cmd_list):
+ printed to stderr instead.
+ """
+
+ try:
+ printable_cmd = ' '.join(pipes.quote(arg) for arg in node_cmd_list)
+ print('Executing "{}"'.format(printable_cmd), file=sys.stderr)
+ sys.stderr.flush()
+
+- output = subprocess.check_output(node_cmd_list)
++ # We need to redirect stderr to a pipe because
++ # https://github.com/nodejs/node/issues/14752 causes issues with make.
++ proc = subprocess.Popen(
++ node_cmd_list, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
++
++ stdout, stderr = proc.communicate()
++ retcode = proc.wait()
++
++ if retcode != 0:
++ print(stderr, file=sys.stderr)
++ sys.stderr.flush()
++ sys.exit(retcode)
+
+ # Process the node script output
+ #
+ # XXX Starting with an empty list means that node scripts can
+ # (intentionally or inadvertently) remove deps. Do we want this?
+ deps = []
+- for line in output.splitlines():
++ for line in stdout.splitlines():
+ if 'dep:' in line:
+ deps.append(line.replace('dep:', ''))
+ else:
+ print(line, file=sys.stderr)
+ sys.stderr.flush()
+
+ return set(deps)
+
+
+
+
+