Skip to content
Open
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
12 changes: 8 additions & 4 deletions pkg/imgutil/load/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func FromArchive(ctx context.Context, client *containerd.Client, options types.I

var loadedImages []images.Image
pf, done := transferutil.ProgressHandler(ctx, options.Stdout)
defer done()

err = client.Transfer(ctx,
tarchive.NewImageImportStream(options.Stdin, ""),
Expand All @@ -96,16 +95,21 @@ func FromArchive(ctx context.Context, client *containerd.Client, options types.I
if img, err := imageService.Get(ctx, p.Name); err == nil {
if !beforeSet[img.Name] {
loadedImages = append(loadedImages, img)
if !options.Quiet {
fmt.Fprintf(options.Stdout, "Loaded image: %s\n", img.Name)
}
}
}
}
pf(p)
}),
)

done()

if !options.Quiet {
for _, img := range loadedImages {
fmt.Fprintf(options.Stdout, "Loaded image: %s\n", img.Name)
}
}

return loadedImages, err
}

Expand Down
Loading