termux-packages/disabled-packages/nodejs-lts/src-node_main.cc.patch
Fredrik Fornwall b1a9c9c562 nodejs: Just keep a single current package
Drop the LTS version of node.js for now and keep only a single current
node package.
2018-09-11 23:51:55 +02:00

15 lines
572 B
Diff

diff -u -r ../node-v6.3.1/src/node_main.cc ./src/node_main.cc
--- ../node-v6.3.1/src/node_main.cc 2016-07-21 16:44:43.000000000 -0400
+++ ./src/node_main.cc 2016-07-23 13:53:57.530095071 -0400
@@ -54,6 +54,10 @@
// calls elsewhere in the program (e.g., any logging from V8.)
setvbuf(stdout, nullptr, _IONBF, 0);
setvbuf(stderr, nullptr, _IONBF, 0);
+ if (getenv("TMPDIR") == NULL) {
+ // Give javascript programs (such as updated versions of npm) a working tmpdir.
+ putenv("TMPDIR=@TERMUX_PREFIX@/tmp");
+ }
return node::Start(argc, argv);
}
#endif