summaryrefslogtreecommitdiff
path: root/runtime/js/40_process.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/40_process.js')
-rw-r--r--runtime/js/40_process.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js
index c33ce1c04..545c6c6d6 100644
--- a/runtime/js/40_process.js
+++ b/runtime/js/40_process.js
@@ -9,6 +9,7 @@
const { assert } = window.__bootstrap.infra;
const {
ArrayPrototypeMap,
+ ArrayPrototypeSlice,
TypeError,
isNaN,
ObjectEntries,
@@ -110,7 +111,7 @@
stdin = "inherit",
}) {
if (cmd[0] != null) {
- cmd[0] = pathFromURL(cmd[0]);
+ cmd = [pathFromURL(cmd[0]), ...ArrayPrototypeSlice(cmd, 1)];
}
const res = opRun({
cmd: ArrayPrototypeMap(cmd, String),