summaryrefslogtreecommitdiffhomepage
path: root/pkg/shim
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/shim')
-rw-r--r--pkg/shim/BUILD1
-rw-r--r--pkg/shim/errors.go3
2 files changed, 4 insertions, 0 deletions
diff --git a/pkg/shim/BUILD b/pkg/shim/BUILD
index d8086688c..b115556f5 100644
--- a/pkg/shim/BUILD
+++ b/pkg/shim/BUILD
@@ -61,6 +61,7 @@ go_test(
library = ":shim",
deps = [
"//pkg/shim/utils",
+ "@com_github_containerd_containerd//errdefs:go_default_library",
"@com_github_opencontainers_runtime_spec//specs-go:go_default_library",
],
)
diff --git a/pkg/shim/errors.go b/pkg/shim/errors.go
index 311a4b427..75d036411 100644
--- a/pkg/shim/errors.go
+++ b/pkg/shim/errors.go
@@ -29,6 +29,9 @@ import (
//
// TODO(gvisor.dev/issue/6232): Remove after upgrading to containerd v1.4
func errToGRPC(err error) error {
+ if err == nil {
+ return nil
+ }
if _, ok := status.FromError(err); ok {
return err
}