Skip to content

Commit c6c0a9f

Browse files
committed
cli/command/plugin: remove special error handling on install, upgrade
Similar to 323fbc4 - this code was added in [moby@c127d96], but used string-matching to detect cases where a user tried to install an image as plugin. However, this handling no longer matched any error-strings, so no longer worked: docker plugin install busybox Error response from daemon: did not find plugin config for specified reference docker.io/library/busybox:latest [moby@c127d96]: moby/moby@c127d96 Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 183337d commit c6c0a9f

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

cli/command/plugin/install.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package plugin
33
import (
44
"context"
55
"fmt"
6-
"strings"
76

87
"github.com/distribution/reference"
98
"github.com/docker/cli/cli"
@@ -94,9 +93,6 @@ func runInstall(ctx context.Context, dockerCLI command.Cli, opts pluginOptions)
9493
}
9594
responseBody, err := dockerCLI.Client().PluginInstall(ctx, localName, options)
9695
if err != nil {
97-
if strings.Contains(err.Error(), "(image) when fetching") {
98-
return errors.New(err.Error() + " - Use \"docker image pull\"")
99-
}
10096
return err
10197
}
10298
defer func() {

cli/command/plugin/upgrade.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package plugin
33
import (
44
"context"
55
"fmt"
6-
"strings"
76

87
"github.com/distribution/reference"
98
"github.com/docker/cli/cli"
@@ -83,9 +82,6 @@ func runUpgrade(ctx context.Context, dockerCLI command.Cli, opts pluginOptions)
8382

8483
responseBody, err := dockerCLI.Client().PluginUpgrade(ctx, opts.localName, options)
8584
if err != nil {
86-
if strings.Contains(err.Error(), "target is image") {
87-
return errors.New(err.Error() + " - Use `docker image pull`")
88-
}
8985
return err
9086
}
9187
defer func() {

0 commit comments

Comments
 (0)