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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require (
github.com/google/go-containerregistry v0.20.6
github.com/goware/prefixer v0.0.0-20160118172347-395022866408
github.com/hexops/gotextdiff v1.0.3
github.com/moby/go-archive v0.1.0
github.com/moby/moby v28.5.1+incompatible
github.com/moby/sys/signal v0.7.1
github.com/spf13/cobra v1.10.1
Expand Down Expand Up @@ -36,7 +37,6 @@ require (
github.com/klauspost/compress v1.18.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.1.0 // indirect
github.com/moby/patternmatcher v0.6.0 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
github.com/moby/sys/user v0.4.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions internal/infra/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"github.com/dependabot/cli/internal/server"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/archive"
"github.com/hexops/gotextdiff"
"github.com/hexops/gotextdiff/myers"
"github.com/hexops/gotextdiff/span"
archive "github.com/moby/go-archive"
"github.com/moby/moby/api/types/registry"
"gopkg.in/yaml.v3"
)
Expand Down Expand Up @@ -546,21 +546,21 @@ func putCloneDir(ctx context.Context, cli *client.Client, updater *Updater, loca
}

func pullImage(ctx context.Context, cli *client.Client, imageName string) error {
inspect, _, err := cli.ImageInspectWithRaw(ctx, imageName)
inspect, err := cli.ImageInspect(ctx, imageName)
if err != nil {
// Image doesn't exist locally, pull it
err = pullImageWithAuth(ctx, cli, imageName)
if err != nil {
return fmt.Errorf("failed to pull image %v: %w", imageName, err)
}

inspect, _, err = cli.ImageInspectWithRaw(ctx, imageName)
inspect, err = cli.ImageInspect(ctx, imageName)
if err != nil {
return fmt.Errorf("failed to inspect image %v after pull: %w", imageName, err)
}
} else {
// Image doesn't exist remotely, don't bother pulling it
if inspect.RepoDigests == nil || len(inspect.RepoDigests) == 0 || inspect.RepoDigests[0] == "" {
if len(inspect.RepoDigests) == 0 || inspect.RepoDigests[0] == "" {
return nil
}

Expand Down