Improve the error print of image inspect

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: cc9ed0a31b0656c58ad7953f2c54d46258380443
Component: engine
This commit is contained in:
Yanqiang Miao
2017-01-24 11:07:20 +08:00
parent 8cc16f0566
commit 9cbd4394d2
2 changed files with 3 additions and 3 deletions
@@ -761,7 +761,7 @@ func WaitInspectWithArgs(dockerBinary, name, expr, expected string, timeout time
for {
result := icmd.RunCommand(dockerBinary, args...)
if result.Error != nil {
if !strings.Contains(result.Stderr(), "No such") {
if !strings.Contains(strings.ToLower(result.Stderr()), "no such") {
return errors.Errorf("error executing docker inspect: %v\n%s",
result.Stderr(), result.Stdout())
}