upload: warn the user if no --arch flag is passed on upload

This mitigates the issue that a `image-builder upload` command
currently does not know the target architecture of the image
it uploads.
This commit is contained in:
Michael Vogt 2025-06-03 12:35:40 +02:00 committed by Achilleas Koutsou
parent 2c017fc630
commit 03613a3fb3
3 changed files with 34 additions and 13 deletions

View file

@ -335,7 +335,7 @@ func cmdBuild(cmd *cobra.Command, args []string) error {
}
bootMode := res.ImgType.BootMode()
uploader, err := uploaderFor(cmd, res.ImgType.Name(), &bootMode)
uploader, err := uploaderFor(cmd, res.ImgType.Name(), res.ImgType.Arch().Name(), &bootMode)
if errors.Is(err, ErrUploadTypeUnsupported) || errors.Is(err, ErrUploadConfigNotProvided) {
err = nil
}