@@ -28,7 +28,6 @@ import (
2828 "github.com/containerd/containerd/cmd/ctr/commands"
2929 "github.com/containerd/containerd/cmd/ctr/commands/run"
3030 "github.com/containerd/containerd/containers"
31- "github.com/containerd/containerd/errdefs"
3231 "github.com/containerd/containerd/log"
3332 "github.com/containerd/typeurl"
3433 "github.com/urfave/cli"
@@ -65,17 +64,17 @@ var createCommand = cli.Command{
6564 if config {
6665 id = context .Args ().First ()
6766 if context .NArg () > 1 {
68- return errdefs .ErrArgConfigFile
67+ return commands .ErrArgConfigFile
6968 }
7069 } else {
7170 id = context .Args ().Get (1 )
7271 ref = context .Args ().First ()
7372 if ref == "" {
74- return errdefs .ErrUnprovidedImageRef
73+ return commands .ErrUnprovidedImageRef
7574 }
7675 }
7776 if id == "" {
78- return errdefs .ErrEmptyContainerID
77+ return commands .ErrEmptyContainerID
7978 }
8079 client , ctx , cancel , err := commands .NewClient (context )
8180 if err != nil {
@@ -168,7 +167,7 @@ var deleteCommand = cli.Command{
168167 }
169168
170169 if context .NArg () == 0 {
171- return errdefs .ErrDeleteNoneContainer
170+ return commands .ErrDeleteNoneContainer
172171 }
173172 for _ , arg := range context .Args () {
174173 if err := deleteContainer (ctx , client , arg , deleteOpts ... ); err != nil {
@@ -214,7 +213,7 @@ var setLabelsCommand = cli.Command{
214213 Action : func (context * cli.Context ) error {
215214 containerID , labels := commands .ObjectWithLabelArgs (context )
216215 if containerID == "" {
217- return errdefs .ErrEmptyContainerID
216+ return commands .ErrEmptyContainerID
218217 }
219218 client , ctx , cancel , err := commands .NewClient (context )
220219 if err != nil {
@@ -250,7 +249,7 @@ var infoCommand = cli.Command{
250249 Action : func (context * cli.Context ) error {
251250 id := context .Args ().First ()
252251 if id == "" {
253- return errdefs .ErrEmptyContainerID
252+ return commands .ErrEmptyContainerID
254253 }
255254 client , ctx , cancel , err := commands .NewClient (context )
256255 if err != nil {
0 commit comments