distro/rhel86+90: common error message for unsupported customizations
Use the same error message for both edge-installer and edge-simplified-installer when an unsupported customization is added.
This commit is contained in:
parent
3a1765a5a8
commit
db2910fed9
2 changed files with 6 additions and 4 deletions
|
|
@ -562,8 +562,9 @@ func (t *imageType) checkOptions(customizations *blueprint.Customizations, optio
|
|||
}
|
||||
|
||||
if t.name == "edge-simplified-installer" {
|
||||
if err := customizations.CheckAllowed("InstallationDevice", "FDO"); err != nil {
|
||||
return fmt.Errorf("boot ISO image type %q contains unsupported blueprint customizations: %v", t.name, err)
|
||||
allowed := []string{"InstallationDevice", "FDO"}
|
||||
if err := customizations.CheckAllowed(allowed...); err != nil {
|
||||
return fmt.Errorf("unsupported blueprint customizations found for boot ISO image type %q: (allowed: %s)", t.name, strings.Join(allowed, ", "))
|
||||
}
|
||||
if customizations.GetInstallationDevice() == "" {
|
||||
return fmt.Errorf("boot ISO image type %q requires specifying an installation device to install to", t.name)
|
||||
|
|
|
|||
|
|
@ -550,8 +550,9 @@ func (t *imageType) checkOptions(customizations *blueprint.Customizations, optio
|
|||
}
|
||||
|
||||
if t.name == "edge-simplified-installer" {
|
||||
if err := customizations.CheckAllowed("InstallationDevice", "FDO"); err != nil {
|
||||
return fmt.Errorf("boot ISO image type %q contains unsupported blueprint customizations: %v", t.name, err)
|
||||
allowed := []string{"InstallationDevice", "FDO"}
|
||||
if err := customizations.CheckAllowed(allowed...); err != nil {
|
||||
return fmt.Errorf("unsupported blueprint customizations found for boot ISO image type %q: (allowed: %s)", t.name, strings.Join(allowed, ", "))
|
||||
}
|
||||
if customizations.GetInstallationDevice() == "" {
|
||||
return fmt.Errorf("boot ISO image type %q requires specifying an installation device to install to", t.name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue