mirror of
https://github.com/containers/podman.git
synced 2025-11-30 10:07:33 +08:00
update buildah and c/common to latest
also includes bumps for c/storage and c/image Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
19
vendor/github.com/containers/buildah/util/util.go
generated
vendored
19
vendor/github.com/containers/buildah/util/util.go
generated
vendored
@@ -466,22 +466,3 @@ func VerifyTagName(imageSpec string) (types.ImageReference, error) {
|
||||
}
|
||||
return ref, nil
|
||||
}
|
||||
|
||||
// Cause returns the most underlying error for the provided one. There is a
|
||||
// maximum error depth of 100 to avoid endless loops. An additional error log
|
||||
// message will be created if this maximum has reached.
|
||||
func Cause(err error) (cause error) {
|
||||
cause = err
|
||||
|
||||
const maxDepth = 100
|
||||
for i := 0; i <= maxDepth; i++ {
|
||||
res := errors.Unwrap(cause)
|
||||
if res == nil {
|
||||
return cause
|
||||
}
|
||||
cause = res
|
||||
}
|
||||
|
||||
logrus.Errorf("Max error depth of %d reached, cannot unwrap until root cause: %v", maxDepth, err)
|
||||
return cause
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user