dan.the.discloser
dan.the.discloser•3y ago

How do I wait for the long running shell script to finish?

When I do this, await returns immediately.
const D = await Deno.run({cmd: ["sh", "long-running-script"]});
console.log(D)
const D = await Deno.run({cmd: ["sh", "long-running-script"]});
console.log(D)
3 Replies
crowlKats
crowlKats•3y ago
Deno.run doesnt return a promise See https://deno.land/api@v1.26.2?s=Deno.run for documentation on how to use it
Doctor 🤖
Doctor 🤖•3y ago
const D = await Deno.run({cmd: ["sh", "long-running-script"]}).status()
const D = await Deno.run({cmd: ["sh", "long-running-script"]}).status()
dan.the.discloser
dan.the.discloserOP•3y ago
thank you; will give it a try

Did you find this page helpful?