main: fix auto-detected distro that is non-visible, tweak order

This commit fixes the issue that the auto-detect distro is not
visible in the progress message. It also tweaks the order of
the message to show:
```
Building manifest for <distro>-<img-type>
```
to be more conistent.

Closes: https://github.com/osbuild/image-builder-cli/issues/121
This commit is contained in:
Michael Vogt 2025-02-04 12:01:50 +01:00 committed by Ondřej Budai
parent fdab539045
commit 24dc23ac3b

View file

@ -112,10 +112,6 @@ func cmdManifestWrapper(pbar progress.ProgressBar, cmd *cobra.Command, args []st
return nil, err
}
imgTypeStr := args[0]
pbar.SetPulseMsgf("Manifest generation step")
pbar.SetMessagef("Building manifest for %s-%s", imgTypeStr, distroStr)
bp, err := blueprintload.Load(blueprintPath)
if err != nil {
return nil, err
@ -125,6 +121,9 @@ func cmdManifestWrapper(pbar progress.ProgressBar, cmd *cobra.Command, args []st
if err != nil {
return nil, err
}
imgTypeStr := args[0]
pbar.SetPulseMsgf("Manifest generation step")
pbar.SetMessagef("Building manifest for %s-%s", distroStr, imgTypeStr)
img, err := getOneImage(dataDir, distroStr, imgTypeStr, archStr)
if err != nil {