Shell glob in TaskProcessAction args not working

I’m making a task that runs the deno fmt CLI, which accepts a files arg which is a glob.

With a fixtures/foo.md file in the project containing a Deno formatting error to check, using the CLI in Terminal works fine:

deno fmt --check fixtures/*.md

But, when using a TaskProcessAction:

new TaskProcessAction("deno", {
  args: ["fmt", "--check", "fixtures/*.md"],
  shell: true,
});

The deno fmt command exits with code 1:

Task Terminated with exit code 1
errore: No target files found.

Any idea what the problem is; how can you use shell globs in TaskProcessAction args?

I’m not entirely sure that the glob expansion will work here, since Nova does not invoke things within an interactive terminal (just a login shell) which could perform the expansion. But we can investigate!

I also noticed the same problem using shell string quotes. To solve the edge case of a file with a name that starts with a space character in a real terminal you can do ' file.txt' as an arg, but with TaskProcessAction the arg ends up including the string quotes in the value. I wanted to basically take a Nova workspace config path value and dump it between two quotes so a user can type in filenames that begin with a space, which is a little weird but perfectly valid input.

Sorry I don’t have a precise example handy; it was 4 days ago now and I forget exactly what the full shell script was.

Without the ability to have our shell scripts interpreted properly, I’m not sure how we can deal with certain things like this. I actually gave up on Nova task templates over it, manually configured tasks can do more.