Skip to content

Commit 82881ec

Browse files
Merge pull request #22693 from smarterclayton/messages
When no argument passed to oc adm release new, dry run the output
2 parents ce67cb7 + 15292e0 commit 82881ec

3 files changed

Lines changed: 202 additions & 77 deletions

File tree

pkg/oc/cli/admin/release/image_mapper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func NewTransformFromImageStreamFile(path string, input *imageapi.ImageStream, a
131131
continue
132132
}
133133
if len(tag.From.Name) == 0 {
134-
return nil, fmt.Errorf("Image file %q did not specify a valid target location for tag %q - no from.name for the tag", path, tag.Name)
134+
return nil, fmt.Errorf("no from.name for the tag %s", tag.Name)
135135
}
136136
ref := ImageReference{SourceRepository: tag.From.Name}
137137
for _, inputTag := range input.Spec.Tags {
@@ -145,7 +145,7 @@ func NewTransformFromImageStreamFile(path string, input *imageapi.ImageStream, a
145145
klog.V(2).Infof("Image file %q referenced an image %q that is not part of the input images, skipping", path, tag.From.Name)
146146
continue
147147
}
148-
return nil, fmt.Errorf("image file %q referenced image %q that is not part of the input images", path, tag.Name)
148+
return nil, fmt.Errorf("no input image tag named %q", tag.Name)
149149
}
150150
references[tag.Name] = ref
151151
}

0 commit comments

Comments
 (0)