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
crowlKats2y 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 🤖2y 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
thank you; will give it a try