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:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user