Skip to content

Commit

Permalink
bib: show error details from podman if podman pull fails
Browse files Browse the repository at this point in the history
Right now if `podman pull` fails no error output from podman is
visible to the user. This commit tweaks that so that the output
is part of the error.
  • Loading branch information
mvo5 authored and achilleas-k committed Apr 19, 2024
1 parent 31e7ba7 commit c102e26
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bib/cmd/bootc-image-builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ func makeManifest(c *ManifestConfig, cacheRoot string) (manifest.OSBuildManifest
// to using containers storage in all code paths happened.
// We might want to change this behaviour in the future to match podman.
if !c.Local {
pullCmd := exec.Command("podman", "pull", "--arch", c.Architecture.String(), c.Imgref)
if err := pullCmd.Run(); err != nil {
return nil, fmt.Errorf("failed to pull container image: %w", err)
if output, err := exec.Command("podman", "pull", "--arch", c.Architecture.String(), c.Imgref).CombinedOutput(); err != nil {
return nil, fmt.Errorf("failed to pull container image: %w\n%s", err, output)
}
}
cntSize, err := getContainerSize(c.Imgref)
Expand Down

0 comments on commit c102e26

Please sign in to comment.