From 2ac031d6fd3cb9b98ffb1801033d96675291f577 Mon Sep 17 00:00:00 2001 From: Leo K Date: Wed, 4 Aug 2021 21:47:43 +0200 Subject: feat(unstable): clean environmental variables for subprocess (#11571) This commit adds "Deno.RunOptions.clearEnv" option, that allows to clear environmental variables from parent process before spawning a subprocess. --- runtime/js/40_process.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/js') diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js index 70a590f36..543c53c27 100644 --- a/runtime/js/40_process.js +++ b/runtime/js/40_process.js @@ -100,6 +100,7 @@ function run({ cmd, cwd = undefined, + clearEnv = false, env = {}, stdout = "inherit", stderr = "inherit", @@ -111,6 +112,7 @@ const res = opRun({ cmd: ArrayPrototypeMap(cmd, String), cwd, + clearEnv, env: ObjectEntries(env), stdin: isRid(stdin) ? "" : stdin, stdout: isRid(stdout) ? "" : stdout, -- cgit v1.2.3