jclouds / legacy-jclouds-cli

https://jclouds.apache.org
Apache License 2.0
17 stars 5 forks source link

Emit errors to stderr instead of stdout #34

Closed gaul closed 11 years ago

gaul commented 11 years ago

@iocanel What do you think about this commit?

iocanel commented 11 years ago

@andrewgaul Does this solve an issue for you?

gaul commented 11 years ago

@iocanel This helps scripting jclouds-cli, ensuring that stdout does not have spurious data. @mark7 ran into this at Maginatics when setting up a pipeline of the form:

jclouds blobstore read jclouds-cli blobName /dev/stdout | tee sha256sum > outfile

iocanel commented 11 years ago

@andrewgaul: Then let's merge it. I was just asking cause I thought that it would have no effect as the libs that are managing the shell, will replace both out and err with a sigle stream. This is definitely the case for the interactive mode, wasn't sure and neither had the time to dig if this is the case for the non interactive mode.

gaul commented 11 years ago

I tested this in non-interactive mode and it emits to stderr as I expect.