DenoDDeno
Powered by
vwkdV
Deno•3y ago•
3 replies
vwkd

Empty output in Deno.Command

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

If I delete the
grep
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
—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))
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))
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Log Deno.command process output
KayKKay / help
3y ago
Deno.Command output as it runs
bombillazoBbombillazo / help
3y ago
How to log Deno.Command output in real time (not after command completes)
bombillazoBbombillazo / help
2y ago
Deno.Command
TangJieHaoTTangJieHao / help
3y ago