vwkdV
Deno3y ago
3 replies
vwkd

Empty output in Deno.Command

I’m trying to run the command git log —grep='.' from Deno. However, it always returns an empty output.

If I delete the grep option it returns it fine. Running the same command from the CLI returns all commits.

It’s weird because other “similarly looking options” seem to work fine for example —format.

const command = new Deno.Command("git", { args: [
  "log",
  // grep seems make problems
  "--grep='.'",
  // "--format='%h %s'",
]});
const { code, stdout, stderr } = await command.output();
console.log(code)
console.log(new TextDecoder().decode(stdout))
console.log(new TextDecoder().decode(stderr))
Was this page helpful?