Skip to content

Commit 58d71de

Browse files
committed
[js] Stringify the array of arguments passed to nqp::spawn
1 parent 60dd4ca commit 58d71de

File tree

1 file changed

+5
-1
lines changed
  • src/vm/js/nqp-runtime

1 file changed

+5
-1
lines changed

src/vm/js/nqp-runtime/io.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,11 @@ function convertNull(obj) {
472472
}
473473

474474
op.spawn = function(command, dir, env, input, output, error, flags) {
475-
return nqpIo.spawn(command.array, dir, env.$$toObject(), convertNull(input), convertNull(output), convertNull(error), flags);
475+
let stringified = [];
476+
for (let c of command.array) {
477+
stringified.push(nqp.toStr(c, null));
478+
}
479+
return nqpIo.spawn(stringified, dir, env.$$toObject(), convertNull(input), convertNull(output), convertNull(error), flags);
476480
};
477481

478482

0 commit comments

Comments
 (0)