Create a new Error when there is no Error to wrap
Wrapping a `nil` error produces `nil`, which causes the calling code to see success, and continue on with a default-created WorkerOpt, which causes segfaults later. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>v0.7
parent
1036fafffa
commit
c67499de09
|
@ -74,7 +74,7 @@ func newContainerd(root string, client *containerd.Client, snapshotterName, ns s
|
|||
return base.WorkerOpt{}, errors.Wrap(err, "failed to list runtime plugin")
|
||||
}
|
||||
if len(resp.Plugins) == 0 {
|
||||
return base.WorkerOpt{}, errors.Wrap(err, "failed to get runtime plugin")
|
||||
return base.WorkerOpt{}, errors.New("failed to find any runtime plugins")
|
||||
}
|
||||
|
||||
var platforms []specs.Platform
|
||||
|
|
Loading…
Reference in New Issue