diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-04-26 09:26:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 09:26:05 -0400 |
commit | 3c7c5865778360aeb2b1285a414d1f8d878d7a22 (patch) | |
tree | 519dca4c95f37f60f7f5e1dabcdddc5df4515d1e /runtime/js/40_process.js | |
parent | dc4ab1d9340a58f81beab24ef211e900acbb9ad8 (diff) |
refactor(ops/process): add `StdioOrRid` enum (#14393)
Diffstat (limited to 'runtime/js/40_process.js')
-rw-r--r-- | runtime/js/40_process.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js index 545c6c6d6..7a5284404 100644 --- a/runtime/js/40_process.js +++ b/runtime/js/40_process.js @@ -11,7 +11,6 @@ ArrayPrototypeMap, ArrayPrototypeSlice, TypeError, - isNaN, ObjectEntries, String, } = window.__bootstrap.primordials; @@ -95,10 +94,6 @@ } } - function isRid(arg) { - return !isNaN(arg); - } - function run({ cmd, cwd = undefined, @@ -120,12 +115,9 @@ env: ObjectEntries(env), gid, uid, - stdin: isRid(stdin) ? "" : stdin, - stdout: isRid(stdout) ? "" : stdout, - stderr: isRid(stderr) ? "" : stderr, - stdinRid: isRid(stdin) ? stdin : 0, - stdoutRid: isRid(stdout) ? stdout : 0, - stderrRid: isRid(stderr) ? stderr : 0, + stdin, + stdout, + stderr, }); return new Process(res); } |