Skip to content

Commit a76cefd

Browse files
committed
plugin status should be skip, not error
Signed-off-by: pacoxu <[email protected]>
1 parent cb8253e commit a76cefd

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

cmd/ctr/commands/plugins/plugins.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"github.com/containerd/containerd/api/types"
2727
"github.com/containerd/containerd/cmd/ctr/commands"
2828
"github.com/containerd/containerd/platforms"
29+
pluginutils "github.com/containerd/containerd/plugin"
2930
v1 "github.com/opencontainers/image-spec/specs-go/v1"
3031
"github.com/urfave/cli"
3132
"google.golang.org/grpc/codes"
@@ -121,7 +122,11 @@ var listCommand = cli.Command{
121122
status := "ok"
122123

123124
if plugin.InitErr != nil {
124-
status = "error"
125+
if strings.Contains(plugin.InitErr.Message, pluginutils.ErrSkipPlugin.Error()) {
126+
status = "skip"
127+
} else {
128+
status = "error"
129+
}
125130
}
126131

127132
var platformColumn = "-"

0 commit comments

Comments
 (0)