Skip to content

Commit

Permalink
refactor: use index to find asset properly
Browse files Browse the repository at this point in the history
  • Loading branch information
zyrouge committed Nov 8, 2023
1 parent b3cef3e commit d109b06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commands/self-update.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ var SelfUpdateCommand = cli.Command{
}
arch := utils.GetSystemArch()
var asset *core.GithubApiReleaseAsset
for _, x := range release.Assets {
for i := range release.Assets {
x := release.Assets[i]
if strings.HasSuffix(x.Name, arch) {
asset = &x
break
Expand Down

0 comments on commit d109b06

Please sign in to comment.