Skip to content

Commit eebf682

Browse files
committed
cli/command/plugin: remove errdefs uses
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 214d2bf commit eebf682

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

cli/command/plugin/upgrade.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/docker/cli/cli/command"
1111
"github.com/docker/cli/internal/jsonstream"
1212
"github.com/docker/cli/internal/prompt"
13-
"github.com/docker/docker/errdefs"
1413
"github.com/pkg/errors"
1514
"github.com/spf13/cobra"
1615
)
@@ -70,7 +69,7 @@ func runUpgrade(ctx context.Context, dockerCLI command.Cli, opts pluginOptions)
7069
return err
7170
}
7271
if !r {
73-
return errdefs.Cancelled(errors.New("plugin upgrade has been cancelled"))
72+
return cancelledErr{errors.New("plugin upgrade has been cancelled")}
7473
}
7574
}
7675

@@ -93,3 +92,7 @@ func runUpgrade(ctx context.Context, dockerCLI command.Cli, opts pluginOptions)
9392
_, _ = fmt.Fprintf(dockerCLI.Out(), "Upgraded plugin %s to %s\n", opts.localName, opts.remote) // todo: return proper values from the API for this result
9493
return nil
9594
}
95+
96+
type cancelledErr struct{ error }
97+
98+
func (cancelledErr) Cancelled() {}

0 commit comments

Comments
 (0)