fix bad output format for attaching pods

pull/6/head
Di Xu 2017-11-28 18:09:27 +08:00
parent e7ad6e6008
commit 6dddafe73b
1 changed files with 3 additions and 5 deletions

View File

@ -259,11 +259,6 @@ func (p *AttachOptions) Run() error {
}
fn := func() error {
if !p.Quiet && stderr != nil {
fmt.Fprintln(stderr, "If you don't see a command prompt, try pressing enter.")
}
restClient, err := restclient.RESTClientFor(p.Config)
if err != nil {
return err
@ -285,6 +280,9 @@ func (p *AttachOptions) Run() error {
return p.Attach.Attach("POST", req.URL(), p.Config, p.In, p.Out, p.Err, t.Raw, sizeQueue)
}
if !p.Quiet && stderr != nil {
fmt.Fprintln(stderr, "If you don't see a command prompt, try pressing enter.")
}
if err := t.Safe(fn); err != nil {
return err
}