Remove unecessary method parameter

becaues now we have a receiver which already has that field

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
Dimitris Karakasilis 2024-02-20 16:07:23 +02:00
parent 88454bdda4
commit c523f48a17

View File

@ -47,7 +47,7 @@ func (i *UpgradeAction) Run() (err error) {
// files, thus we take a simpler approach and only install the new efi file
// and the relevant conf
if i.spec.RecoveryUpgrade {
return i.installRecovery(i.cfg.Logger)
return i.installRecovery()
}
// Dump artifact to efi dir
@ -85,7 +85,7 @@ func (i *UpgradeAction) Run() (err error) {
// installRecovery replaces the "recovery" role efi and conf files with
// the UnassignedArtifactRole efi and loader files from dir
func (i *UpgradeAction) installRecovery(logger v1.Logger) error {
func (i *UpgradeAction) installRecovery() error {
tmpDir, err := os.MkdirTemp("", "")
if err != nil {
return fmt.Errorf("creating a tmp dir: %w", err)
@ -114,5 +114,5 @@ func (i *UpgradeAction) installRecovery(logger v1.Logger) error {
return err
}
return replaceRoleInKey(targetConfPath, "efi", UnassignedArtifactRole, "recovery", logger)
return replaceRoleInKey(targetConfPath, "efi", UnassignedArtifactRole, "recovery", i.cfg.Logger)
}