-
Notifications
You must be signed in to change notification settings - Fork 18.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix stdout and stderr in api client #24298
fix stdout and stderr in api client #24298
Conversation
87b7867
to
543a734
Compare
LGTM 🐸 |
@@ -33,7 +33,7 @@ func newConfigCommand(dockerCli *client.DockerCli) *cobra.Command { | |||
} | |||
|
|||
func runConfig(dockerCli *client.DockerCli, opts configOptions) error { | |||
bundle, err := loadBundlefile(dockerCli.Err(), opts.namespace, opts.bundlefile) | |||
bundle, err := loadBundlefile(dockerCli.Out(), opts.namespace, opts.bundlefile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think stderr
is correct here. This output is logging, not "normal program output".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, if someone is trying to get the output of the bundle into a file, they would direct stdout to a file, but then their will wouldn't be valid because this logging line would be included.
If it goes to stderr the file will be valid JSON.
It looks like |
543a734
to
5c46f77
Compare
@dnephin Thanks. It is my miss in volume/remove.go. Really sorry. PR updated. |
LGTM |
c0ac7e5
to
0859ad4
Compare
Signed-off-by: allencloud <allen.sun@daocloud.io>
0859ad4
to
533bd82
Compare
LGTM |
This PR did:
Write more specific code when dealing api client stdout and stderr:
dockerCli.Err()
;fmt.Println
;Signed-off-by: allencloud allen.sun@daocloud.io