Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions cli/command/plugin/install.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@ package plugin
import (
"context"
"fmt"
"strings"

"github.com/distribution/reference"
"github.com/docker/cli/cli"
Expand DownExpand Up@@ -94,9 +93,6 @@ func runInstall(ctx context.Context, dockerCLI command.Cli, opts pluginOptions)
}
responseBody, err := dockerCLI.Client().PluginInstall(ctx, localName, options)
if err != nil {
if strings.Contains(err.Error(), "(image) when fetching") {
return errors.New(err.Error() + " - Use \"docker image pull\"")
}
return err
}
defer func() {
Expand Down
8 changes: 0 additions & 8 deletions cli/command/plugin/install_test.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,14 +42,6 @@ func TestInstallErrors(t *testing.T) {
return nil, errors.New("error installing plugin")
},
},
{
description: "installation error due to missing image",
args: []string{"foo"},
expectedError: "docker image pull",
installFunc: func(name string, options client.PluginInstallOptions) (io.ReadCloser, error) {
return nil, errors.New("(image) when fetching")
},
},
}

for _, tc := range testCases {
Expand Down
4 changes: 0 additions & 4 deletions cli/command/plugin/upgrade.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@ package plugin
import (
"context"
"fmt"
"strings"

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

responseBody, err := dockerCLI.Client().PluginUpgrade(ctx, opts.localName, options)
if err != nil {
if strings.Contains(err.Error(), "target is image") {
return errors.New(err.Error() + " - Use `docker image pull`")
}
return err
}
defer func() {
Expand Down
Loading