Merge pull request #1078 from mlaventure/bubble-correct-runc-error
shim: Use correct error when trying to expand runc error
This commit is contained in:
commit
a33e8d034f
@ -323,9 +323,9 @@ func (p *initProcess) runcError(rErr error, msg string) error {
|
||||
rMsg, err := getLastRuncError(p.runc)
|
||||
switch {
|
||||
case err != nil:
|
||||
return errors.Wrapf(err, "%s: %s (%s)", msg, "unable to retrieve runc error", err.Error())
|
||||
return errors.Wrapf(rErr, "%s: %s (%s)", msg, "unable to retrieve runc error", err.Error())
|
||||
case rMsg == "":
|
||||
return errors.Wrap(err, msg)
|
||||
return errors.Wrap(rErr, msg)
|
||||
default:
|
||||
return errors.Errorf("%s: %s", msg, rMsg)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user