diff --git a/src/lib/libwasi.js b/src/lib/libwasi.js index 109592c11b9e2..9b85b56042bba 100644 --- a/src/lib/libwasi.js +++ b/src/lib/libwasi.js @@ -67,6 +67,10 @@ var WasiLibrary = { '_': getExecutableName() #endif }; + // Forward the Node ones, if any. + if (ENVIRONMENT_IS_NODE) { + env = {...env, ...process.env}; + } // Apply the user-provided values, if any. for (var x in ENV) { // x is a key in ENV; if ENV[x] is undefined, that means it was