main: show "success" message with output dir when build finishes

This commit adds a "success" message that also contains the output
dir when the build finishes.

Thanks to SimonS for suggesting this!
This commit is contained in:
Michael Vogt 2025-03-10 10:54:27 +01:00
parent 3eecad6b30
commit 06e73caec1
2 changed files with 8 additions and 1 deletions

View file

@ -268,10 +268,11 @@ func cmdBuild(cmd *cobra.Command, args []string) error {
if err := buildImage(pbar, res, mf.Bytes(), buildOpts); err != nil {
return err
}
pbar.Stop()
fmt.Fprintf(osStdout, "Image build successful, result in %q\n", outputDir)
if uploader != nil {
// XXX: integrate better into the progress, see bib
pbar.Stop()
imagePath := filepath.Join(outputDir, res.ImgType.Name(), res.ImgType.Filename())
if err := uploadImageWithProgress(uploader, imagePath); err != nil {