Skip to content

Commit

Permalink
Remove cutSuffix as its go >=1.20 only (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka authored Jan 11, 2024
1 parent ae41cbf commit ab57da1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/utils/grub.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func (g Grub) copyShim() error {
}
_, name := filepath.Split(f)
// remove the .signed suffix if present
name, _ = strings.CutSuffix(name, ".signed")
name = strings.TrimSuffix(name, ".signed")
fileWriteName := filepath.Join(cnst.EfiDir, fmt.Sprintf("EFI/boot/%s", name))
g.config.Logger.Debugf("Copying %s to %s", f, fileWriteName)

Expand Down Expand Up @@ -300,7 +300,7 @@ func (g Grub) copyGrub() error {
}
_, name := filepath.Split(f)
// remove the .signed suffix if present
name, _ = strings.CutSuffix(name, ".signed")
name = strings.TrimSuffix(name, ".signed")
fileWriteName := filepath.Join(cnst.EfiDir, fmt.Sprintf("EFI/boot/%s", name))
g.config.Logger.Debugf("Copying %s to %s", f, fileWriteName)

Expand Down

0 comments on commit ab57da1

Please sign in to comment.