cli/command/trust: remove errdefs uses
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
1168edb259
commit
251725676e
@ -9,7 +9,6 @@ import (
|
||||
"github.com/docker/cli/cli/command/image"
|
||||
"github.com/docker/cli/cli/trust"
|
||||
"github.com/docker/cli/internal/prompt"
|
||||
"github.com/docker/docker/errdefs"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/theupdateframework/notary/client"
|
||||
@ -50,7 +49,7 @@ func revokeTrust(ctx context.Context, dockerCLI command.Cli, remote string, opti
|
||||
return err
|
||||
}
|
||||
if !deleteRemote {
|
||||
return errdefs.Cancelled(errors.New("trust revoke has been cancelled"))
|
||||
return cancelledErr{errors.New("trust revoke has been cancelled")}
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,6 +69,10 @@ func revokeTrust(ctx context.Context, dockerCLI command.Cli, remote string, opti
|
||||
return nil
|
||||
}
|
||||
|
||||
type cancelledErr struct{ error }
|
||||
|
||||
func (cancelledErr) Cancelled() {}
|
||||
|
||||
func revokeSignature(notaryRepo client.Repository, tag string) error {
|
||||
if tag != "" {
|
||||
// Revoke signature for the specified tag
|
||||
|
Loading…
x
Reference in New Issue
Block a user