Skip to content

Commit

Permalink
Bug 1500436 - Redirect node.js's stderr to a pipe. r=froydnj
Browse files Browse the repository at this point in the history
This works around nodejs/node#14752, which
causes problems with make.

Differential Revision: https://phabricator.services.mozilla.com/D35986

UltraBlame original commit: 562655fedb9df034ae1f8c32cd730f6498d501a7
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent cec9ec3 commit 2e7ff9c
Showing 1 changed file with 96 additions and 3 deletions.
99 changes: 96 additions & 3 deletions python/mozbuild/mozbuild/action/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,106 @@
(
)

output
#
We
need
to
redirect
stderr
to
a
pipe
because

#
https
:
/
/
github
.
com
/
nodejs
/
node
/
issues
/
14752
causes
issues
with
make
.

proc
=
subprocess
.
check_output
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
)

#
Expand Down Expand Up @@ -422,7 +515,7 @@
for
line
in
output
stdout
.
splitlines
(
Expand Down

0 comments on commit 2e7ff9c

Please sign in to comment.