Skip to content

Commit

Permalink
manifest: propagate kickstart stage option creation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
achilleas-k committed Feb 15, 2024
1 parent 479e652 commit 0f6a1cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/manifest/anaconda_installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func (p *AnacondaInstaller) payloadStages() []*osbuild.Stage {
)

if err != nil {
panic("failed to create kickstartstage options for interactive defaults")
panic(fmt.Sprintf("failed to create kickstart stage options for interactive defaults: %v", err))
}

stages = append(stages, osbuild.NewKickstartStage(kickstartOptions))
Expand Down
11 changes: 5 additions & 6 deletions pkg/manifest/anaconda_installer_iso_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func (p *AnacondaInstallerISOTree) ostreeCommitStages() []*osbuild.Stage {
p.OSName)

if err != nil {
panic("failed to create kickstart stage options")
panic(fmt.Sprintf("failed to create kickstart stage options: %v", err))
}

stages = append(stages, p.makeKickstartStages(kickstartOptions)...)
Expand Down Expand Up @@ -414,6 +414,9 @@ func (p *AnacondaInstallerISOTree) ostreeContainerStages() []*osbuild.Stage {
"oci",
"",
"")
if err != nil {
panic(fmt.Sprintf("failed to create kickstart stage options: %v", err))
}

// NOTE: these are similar to the unattended kickstart options in the
// other two payload configurations but partitioning is different and
Expand All @@ -428,10 +431,6 @@ func (p *AnacondaInstallerISOTree) ostreeContainerStages() []*osbuild.Stage {
All: true,
}

if err != nil {
panic("failed to create kickstartstage options")
}

stages = append(stages, osbuild.NewKickstartStage(kickstartOptions))

// and what we can't do in a separate kickstart that we include
Expand Down Expand Up @@ -489,7 +488,7 @@ func (p *AnacondaInstallerISOTree) tarPayloadStages() []*osbuild.Stage {
makeISORootPath(p.PayloadPath))

if err != nil {
panic("failed to create kickstart stage options")
panic(fmt.Sprintf("failed to create kickstart stage options: %v", err))
}

stages = append(stages, p.makeKickstartStages(kickstartOptions)...)
Expand Down

0 comments on commit 0f6a1cb

Please sign in to comment.