task
task copied to clipboard
Allow only actual errors to be outputted to stderr (taskfile thus on stdout)
when now running task, the task specific out (task: ) is outputted to stderr. Would be good to have an option have this outputted on stdout, so stderr is only for actual errors
Hi @hans-d,
As far I understand, stderr is not exclusive for errors. By convention stderr usually outputs logs in general, while stdout is for actual ("useful") application output. Given these Task outputs are considered logs, that's why they go to stderr.
Do you have an specific reason for wanting that to change?
Default behaviour should stay as is, but for some cases I want to capture the errors from underlying commands executed, and the tracing of task in separate streams. Eg using this in pipelines to have a quick report of "the error", and a longer more detailed section with all the regular log output. Yes, I can use some grep here, but rather would not rely on that.