-
Hi, please take a look at this code: // mod.ts
const p1 = Deno.run({
cmd: ['echo', 'deno'],
});
const p2 = Deno.run({
cmd: ['deno', 'run', 'child.ts'],
});
// p2.status(); // child.ts
console.log('Hi from child!'); If running this code with Now comment out // mod.ts
const p1 = Deno.run({
cmd: ['echo', 'deno'],
});
const p2 = Deno.run({
cmd: ['deno', 'run', 'child.ts'],
});
p2.status(); Now prints both My question is, is this expected behavior? If it is please some one can explain me why this happens? Thank you so much. Deno v1.13.0 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
This is solved by const p1 = await Deno.spawn("echo", {
args: ["deno"],
stdout: "inherit",
});
const p2 = await Deno.spawn("deno", {
args: ["run", "child.ts"],
stdout: "inherit",
}); |
Beta Was this translation helpful? Give feedback.
This is solved by
Deno.spawn
: