birgersp
birgersp
DDeno
Created by birgersp on 7/27/2023 in #help
Deno.Command arg with an asterisk?
I am trying to execute a shell command from Deno, where one of the command args contains an asterisk. Example:
const output = new Deno.Command("cp", { args: ["source/*", "destination"] }).outputSync()
console.error(new TextDecoder().decode(output.stderr))
const output = new Deno.Command("cp", { args: ["source/*", "destination"] }).outputSync()
console.error(new TextDecoder().decode(output.stderr))
It yields:
cp: cannot stat 'source/*': No such file or directory
Q: How can I pass an asterisk to one of the Deno.Command args?
6 replies