In Deno, I know that I can run a command like so:
const process = Deno.run({
cmd: ["echo", "hello world"]
})
How can I run my command with a different working directory?
Use cwd to specify a different path relative to your working directory (or use an absolute path).
const process = Deno.run({
cmd: ["echo", "hello world"],
cwd: "/path/to/dir"
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With