MCPcopy Index your code
hub / github.com/nodejs/node / runEnvOutside

Function runEnvOutside

test/parallel/test-icu-env.js:46–52  ·  view source on GitHub ↗
(addEnv, code, ...args)

Source from the content-addressed store, hash-verified

44
45
46function runEnvOutside(addEnv, code, ...args) {
47 return execFileSync(
48 process.execPath,
49 ['-e', `process.stdout.write(String(${code}));`],
50 { env: { ...process.env, ...addEnv }, encoding: 'utf8' }
51 );
52}
53
54function runEnvInside(addEnv, func, ...args) {
55 Object.assign(process.env, addEnv); // side effects!

Callers 1

test-icu-env.jsFile · 0.85

Calls 1

execFileSyncFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…