mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix bug: exec non-exist command miss a "\n"
When exec a non-exist command, it should print a newline at last. Currently: ``` $ docker exec -ti f5f703ea2c0a144 bash rpc error: code = 2 desc = "oci runtime error: exec failed: exec: \"bash\": executable file not found in $PATH"$ ``` Signed-off-by: Feng Yan <fy2462@gmail.com>
This commit is contained in:
parent
deb6ea4702
commit
8bf5613c1a
1 changed files with 2 additions and 2 deletions
|
@ -110,8 +110,8 @@ func (s *containerRouter) postContainerExecStart(ctx context.Context, w http.Res
|
||||||
if execStartCheck.Detach {
|
if execStartCheck.Detach {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
stdout.Write([]byte(err.Error()))
|
stdout.Write([]byte(err.Error() + "\r\n"))
|
||||||
logrus.Errorf("Error running exec in container: %v\n", err)
|
logrus.Errorf("Error running exec in container: %v", err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue