Skip to content

Commit eabb683

Browse files
committed
vz: change linuxBootLoader() to return error, then explicitly ignores the error on caller.
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
1 parent bcc78c8 commit eabb683

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/vz/vm_darwin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,8 @@ func getMachineIdentifier(driver *driver.BaseDriver) (*vz.GenericMachineIdentifi
682682
}
683683

684684
func bootLoader(driver *driver.BaseDriver) (vz.BootLoader, error) {
685-
if linuxBootLoder, err := linuxBootLoader(driver); linuxBootLoder != nil {
686-
return linuxBootLoder, err
685+
if linuxBootLoder, _ := linuxBootLoader(driver); linuxBootLoder != nil {
686+
return linuxBootLoder, nil
687687
}
688688

689689
efiVariableStore, err := getEFI(driver)
@@ -700,7 +700,7 @@ func linuxBootLoader(driver *driver.BaseDriver) (*vz.LinuxBootLoader, error) {
700700
initrd := filepath.Join(driver.Instance.Dir, filenames.Initrd)
701701
if _, err := os.Stat(kernel); err != nil {
702702
logrus.Debugf("Kernel file %q not found", kernel)
703-
return nil, nil
703+
return nil, err
704704
}
705705
var opt []vz.LinuxBootLoaderOption
706706
if b, err := os.ReadFile(kernelCmdline); err == nil {

0 commit comments

Comments
 (0)