File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
python/mozbuild/mozbuild/action Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,25 @@ def execute_node_cmd(node_cmd_list):
52
52
print ('Executing "{}"' .format (printable_cmd ), file = sys .stderr )
53
53
sys .stderr .flush ()
54
54
55
- output = subprocess .check_output (node_cmd_list )
55
+ # We need to redirect stderr to a pipe because
56
+ # https://github.com/nodejs/node/issues/14752 causes issues with make.
57
+ proc = subprocess .Popen (
58
+ node_cmd_list , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
59
+
60
+ stdout , stderr = proc .communicate ()
61
+ retcode = proc .wait ()
62
+
63
+ if retcode != 0 :
64
+ print (stderr , file = sys .stderr )
65
+ sys .stderr .flush ()
66
+ sys .exit (retcode )
56
67
57
68
# Process the node script output
58
69
#
59
70
# XXX Starting with an empty list means that node scripts can
60
71
# (intentionally or inadvertently) remove deps. Do we want this?
61
72
deps = []
62
- for line in output .splitlines ():
73
+ for line in stdout .splitlines ():
63
74
if 'dep:' in line :
64
75
deps .append (line .replace ('dep:' , '' ))
65
76
else :
You can’t perform that action at this time.
0 commit comments