Skip to content
Closed
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
11 changes: 7 additions & 4 deletions libpod/runtime_img.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,7 @@ func getRegistriesToTry(image string, store storage.Store) ([]*pullStruct, error
}
searchRegistries, err := sysregistries.GetRegistries(&types.SystemContext{SystemRegistriesConfPath: registryConfigPath})
if err != nil {
fmt.Println(err)
return nil, errors.Errorf("unable to parse the registries.conf file and"+
return nil, errors.Wrapf(err, "unable to parse the registries.conf file and"+
" the image name '%s' is incomplete.", imageName)
}
for _, searchRegistry := range searchRegistries {
Expand Down Expand Up @@ -587,9 +586,13 @@ func (r *Runtime) PullImage(imgName string, options CopyOptions) error {
copyOptions := common.GetCopyOptions(options.Writer, signaturePolicyPath, &options.DockerRegistryOptions, nil, options.SigningOptions, options.AuthFile)

for _, imageInfo := range pullStructs {
fmt.Printf("Trying to pull %s...\n", imageInfo.image)
if options.Writer != nil {
io.WriteString(options.Writer, fmt.Sprintf("Trying to pull %s...\n", imageInfo.image))
}
if err = cp.Image(policyContext, imageInfo.dstRef, imageInfo.srcRef, copyOptions); err != nil {
fmt.Println("Failed")
if options.Writer != nil {
io.WriteString(options.Writer, "Failed\n")
}
} else {
return nil
}
Expand Down