Skip to content

Commit

Permalink
Dont update images that aren't being started (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: James Otting <[email protected]>
  • Loading branch information
zaporter-work and Otterverse authored Jul 28, 2023
1 parent 9229d98 commit 1f0cbf2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions update.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ func checkUpdate(curProfile *Profile, all, force bool) error {
}
// add current profile's image
for _, i := range checkImageDate(curProfile, checkData, force) {
imagesMap[i] = true
if all || i.Platform == "linux/"+curProfile.Arch {
imagesMap[i] = true
}
}

if all {
Expand Down Expand Up @@ -189,7 +191,7 @@ func checkImageDate(profile *Profile, checkData ImageCheckData, force bool) []Im
imageCandidates = append(imageCandidates, ImageDef{Image: profile.ImageAMD64, Platform: "linux/amd64"})
imageCandidates = append(imageCandidates, ImageDef{Image: profile.ImageARM64, Platform: "linux/arm64"})
case profile.Image != "":
imageCandidates = append(imageCandidates, ImageDef{Image: profile.Image, Platform: profile.Arch})
imageCandidates = append(imageCandidates, ImageDef{Image: profile.Image, Platform: "linux/" + profile.Arch})
default:
return images
}
Expand Down

0 comments on commit 1f0cbf2

Please sign in to comment.