spin icon indicating copy to clipboard operation
spin copied to clipboard

fix(output): send info strings to stderr

Open webmakersteve opened this issue 3 years ago • 3 comments

Currently the tool sends out informational output to stdout. This makes it hard to pipe output into tools like jq and such.

Adjusts it so only jsonoutput and output go to stdout and the rest should go to stderr via warn.

webmakersteve avatar Jan 10 '23 01:01 webmakersteve

This is technically a breaking change if people depend on the old behavior - so could use some advice on if this is something desired by the team. And if so, how to indicate that in the pr.

webmakersteve avatar Jan 20 '23 05:01 webmakersteve

Anyone available to review this? if it isn't desired it can be closed.

webmakersteve avatar Feb 21 '23 20:02 webmakersteve

Thank you for investigating and raising a PR with the potential change.

Is the quiet flag insufficient?

$ spin | grep quiet
  -q, --quiet                    squelch non-essential output

I don't have a Spinnaker setup at the moment to query with spin, but from memory using --quiet would trim non-JSON output enabling jq or redirect to file usage. I could be mistaken or perhaps it wasn't for all commands..

karlskewes avatar Mar 31 '23 06:03 karlskewes