linode-cli icon indicating copy to clipboard operation
linode-cli copied to clipboard

send errors and warnings to stderr

Open jschauma opened this issue 1 year ago • 1 comments

This should help address https://github.com/linode/linode-cli/issues/643, although possibly only in part.

jschauma avatar Sep 13 '24 01:09 jschauma

Overall looks good to me!

zliang-akamai avatar Oct 01 '24 19:10 zliang-akamai

Hey @jschauma, thanks for the contribution! Could you run make format on this PR to fix the lint CI failure?

lgarber-akamai avatar Oct 22 '24 16:10 lgarber-akamai

Sure - ran 'make format'. (I find ending the printf list of arguments with a comma a bit odd, but if that's what the formatter wants...?)

jschauma avatar Oct 22 '24 17:10 jschauma

Sure - ran 'make format'. (I find ending the printf list of arguments with a comma a bit odd, but if that's what the formatter wants...?)

Thank you! The formatter can make some odd decisions at times but we try to keep things as consistent as possible.

lgarber-akamai avatar Oct 22 '24 17:10 lgarber-akamai

FYI: I marked this PR as a breaking change since it technically could break scripts that check for error outputs in stdout. We'll mention this in the notes for the next release.

lgarber-akamai avatar Oct 23 '24 16:10 lgarber-akamai

@zliang-akamai I've been bitten by the behavior fixed by this PR - all of my VM provisioning fails b/c I get an extra

Using default values: {}; use the --no-defaults flag to disable defaults

in the json output. Strangely enough version 5.52.0 doesn't fail for me.

I will add a workaround on my side, however do yu mind pushing a new release to PyPI which includes this PR?

atodorov avatar Oct 24 '24 13:10 atodorov