From 3c7c5865778360aeb2b1285a414d1f8d878d7a22 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 26 Apr 2022 09:26:05 -0400 Subject: refactor(ops/process): add `StdioOrRid` enum (#14393) --- runtime/js/40_process.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'runtime/js') 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); } -- cgit v1.2.3