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:
It yields:
cp: cannot stat 'source/*': No such file or directoryQ: How can I pass an asterisk to one of the Deno.Command args?
2 Replies
The asterisk is a shell-only concept, and not something
cp
can really do. This is a fundamental "limitation" of the fork-exec call happening here. You'd need to manually enumerate the files yourself:
alternatively, if you really want to use shell constructs, you can simply call a shell instead
❤️
for helping noobs like me, you are a true hero