Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pull/254'
Browse files Browse the repository at this point in the history
* origin/pull/254:
  Check and return Open errs
  • Loading branch information
Foxboron committed Nov 1, 2023
2 parents 4bec3f4 + e417314 commit 241bc90
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sbctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,16 @@ func CombineFiles(microcode, initramfs string) (afero.File, error) {
return nil, err
}

one, _ := fs.Fs.Open(microcode)
one, err := fs.Fs.Open(microcode)
if err != nil {
return nil, err
}
defer one.Close()

two, _ := fs.Fs.Open(initramfs)
two, err := fs.Fs.Open(initramfs)
if err != nil {
return nil, err
}
defer two.Close()

_, err = io.Copy(tmpFile, one)
Expand Down

0 comments on commit 241bc90

Please sign in to comment.