diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-03 12:05:55 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 12:05:55 -0500 |
commit | 32b2e367b81ffc808195dbc5ee3097d9936bb57f (patch) | |
tree | 94e50d6a847418b9e9248f546ac25927475a1f01 | |
parent | 8a1955f4191ad2cfac4ad13d9f48293054d65e92 (diff) | |
parent | 4eed89acaa95cc1678bcfee69847e4dfd51290d1 (diff) | |
download | podman-32b2e367b81ffc808195dbc5ee3097d9936bb57f.tar.gz podman-32b2e367b81ffc808195dbc5ee3097d9936bb57f.tar.bz2 podman-32b2e367b81ffc808195dbc5ee3097d9936bb57f.zip |
Merge pull request #9595 from Luap99/fix-9594
Fix possible panic with podman build --iidfile
-rw-r--r-- | cmd/podman/images/build.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 0e1c47399..de532ed78 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -265,6 +265,9 @@ func build(cmd *cobra.Command, args []string) error { } report, err := registry.ImageEngine().Build(registry.GetContext(), containerFiles, *apiBuildOpts) + if err != nil { + return err + } if cmd.Flag("iidfile").Changed { f, err := os.Create(buildOpts.Iidfile) @@ -276,7 +279,7 @@ func build(cmd *cobra.Command, args []string) error { } } - return err + return nil } // buildFlagsWrapperToOptions converts the local build flags to the build options used |