Skip to content

Commit

Permalink
Merge pull request #2824 from QiWang19/add-local-manifest
Browse files Browse the repository at this point in the history
Not use local image create/add manifest
  • Loading branch information
openshift-merge-robot authored Dec 2, 2020
2 parents acb97f1 + b3a1c89 commit 75ae8be
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions cmd/buildah/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,13 @@ func manifestCreateCmd(c *cobra.Command, args []string, opts manifestCreateOpts)
}

for _, imageSpec := range imageSpecs {
ref, _, err := util.FindImage(store, "", systemContext, imageSpec)
ref, err := alltransports.ParseImageName(imageSpec)
if err != nil {
if ref, err = alltransports.ParseImageName(imageSpec); err != nil {
return err
if ref, err = alltransports.ParseImageName(util.DefaultTransport + imageSpec); err != nil {
// check if the local image exists
if ref, _, err = util.FindImage(store, "", systemContext, imageSpec); err != nil {
return err
}
}
}
if _, err = list.Add(getContext(), systemContext, ref, opts.all); err != nil {
Expand Down Expand Up @@ -293,10 +296,13 @@ func manifestAddCmd(c *cobra.Command, args []string, opts manifestAddOpts) error
return err
}

ref, _, err := util.FindImage(store, "", systemContext, imageSpec)
ref, err := alltransports.ParseImageName(imageSpec)
if err != nil {
if ref, err = alltransports.ParseImageName(imageSpec); err != nil {
return err
if ref, err = alltransports.ParseImageName(util.DefaultTransport + imageSpec); err != nil {
// check if the local image exists
if ref, _, err = util.FindImage(store, "", systemContext, imageSpec); err != nil {
return err
}
}
}

Expand Down

0 comments on commit 75ae8be

Please sign in to comment.