From 1ccb9094e3dff6e79874dd0373050c2259b1b595 Mon Sep 17 00:00:00 2001 From: syumai Date: Sat, 6 Jan 2024 23:43:48 +0900 Subject: [PATCH] ignore env in wasm_exec_node.js --- misc/wasm/wasm_exec_node.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/wasm/wasm_exec_node.js b/misc/wasm/wasm_exec_node.js index 9860690..3674930 100644 --- a/misc/wasm/wasm_exec_node.js +++ b/misc/wasm/wasm_exec_node.js @@ -22,7 +22,8 @@ require("./wasm_exec"); const go = new Go(); go.argv = process.argv.slice(2); -go.env = Object.assign({ TMPDIR: require("os").tmpdir() }, process.env); +// to prevent `total length of command line and environment variables exceeds limit` error, ignore env. +// go.env = Object.assign({ TMPDIR: require("os").tmpdir() }, process.env); go.exit = process.exit; WebAssembly.instantiate(fs.readFileSync(process.argv[2]), go.importObject).then((result) => { process.on("exit", (code) => { // Node.js exits if no event handler is pending