Skip to content

Send debug output to stderr #298

@snejus

Description

@snejus

Given a task such as

[tasks.output-json]
cmd = """echo '{"some": "json"}'"""

I see the following output

$ poe output-json
Poe => echo '{"some": "json"}'
{"some": "json"}

Often, I need to pipe the output of a task to another command. For example, I want to use jq to format this JSON:

$ poe output-json | jq
jq: parse error: Invalid numeric literal at line 1, column 4

This currently breaks, since poe logs the command it runs to stdout, together with the task output. I think, I would expect it to log to stderr instead.

For now, I use

$ poe output-json | grep -v '^Poe' | jq
{
  "some": "json"
}

to handle this.

What do you think, @nat-n?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions