Skip to content

Commit

Permalink
Merge pull request containers#9595 from Luap99/fix-9594
Browse files Browse the repository at this point in the history
Fix possible panic with podman build --iidfile
  • Loading branch information
openshift-merge-robot authored Mar 3, 2021
2 parents 8a1955f + 4eed89a commit 32b2e36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/podman/images/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 32b2e36

Please sign in to comment.