termux-packages/packages/nodejs-lts/src-node_main.cc.patch

14 lines
502 B
Diff
Raw Normal View History

2021-10-28 11:37:10 +02:00
--- ./src/node_main.cc 2021-06-03 07:15:32.000000000 +0530
+++ ./src/node_main.cc.mod 2021-06-18 21:13:57.512327727 +0530
@@ -124,6 +124,10 @@
2017-01-09 23:30:11 +01:00
// calls elsewhere in the program (e.g., any logging from V8.)
setvbuf(stdout, nullptr, _IONBF, 0);
setvbuf(stderr, nullptr, _IONBF, 0);
2021-10-28 11:37:10 +02:00
+ if(getenv("TMPDIR") == NULL) {
2017-01-09 23:30:11 +01:00
+ // Give javascript programs (such as updated versions of npm) a working tmpdir.
+ putenv("TMPDIR=@TERMUX_PREFIX@/tmp");
+ }
return node::Start(argc, argv);
}
#endif