diff --git a/container/container_unix.go b/container/container_unix.go index 32325f5639..f02be89e78 100644 --- a/container/container_unix.go +++ b/container/container_unix.go @@ -286,9 +286,8 @@ func (container *Container) UnmountSecrets() error { if _, err := os.Stat(container.SecretMountPath()); err != nil { if os.IsNotExist(err) { return nil - } else { - return err } + return err } return detachMounted(container.SecretMountPath())