Skip to content

Commit 8f5f2fd

Browse files
committed
nodejs: Add wrapper that stops node-js from making stdout non-blocking
The build is failing with errors writing to stdout due to a combination of issues: * ./mach spawns make and reads the output one byte at a time * There are lots of make output due to the rustc debug logs enabled * node-js is run as part of the builds, and it leaves stdout non-blocking: nodejs/node#14752 So, eventually some other commmand can't handle stdout being non-blocking, but the pipe becomes (temporarily) full as mach can't keep up, and the whole shitshow comes to a stop.
1 parent 5305ce9 commit 8f5f2fd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

org.mozilla.FirefoxNightly/org.mozilla.FirefoxNightly.json

+9
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,20 @@
6060
"../shared-modules/gtk2/gtk2.json",
6161
{ "name": "nodejs",
6262
"make-install-args": ["prefix=/app"],
63+
"post-install": [
64+
"mv /app/bin/node /app/bin/real-node",
65+
"install --mode=755 node-stdout-nonblocking-wrapper /app/bin/node"
66+
],
6367
"sources": [
6468
{
6569
"type": "archive",
6670
"url": "https://nodejs.org/dist/v8.12.0/node-v8.12.0.tar.gz",
6771
"sha256" : "b4797843136edd9195c28221a1680ae52c29d867fc5fc1c99f7d6e2f2126a67b"
72+
},
73+
{
74+
"type": "script",
75+
"dest-filename": "node-stdout-nonblocking-wrapper",
76+
"commands": [ 'exec real-node "$@" 2>&1 | cat -' ]
6877
}
6978
]
7079
},

0 commit comments

Comments
 (0)