m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-15 08:33:49 -05:00

Fix crash when checking a remote tag and it is the latest available

This commit is contained in:
Sergio
2025-01-15 16:44:26 +02:00
parent ead74dadd6
commit 3ac6fb57e9
2 changed files with 4 additions and 1 deletions

View File

@@ -135,6 +135,7 @@ impl Image {
pub fn to_update(&self) -> Update {
let has_update = self.has_update();
let update_type = match has_update {
Status::UpToDate => "none",
Status::UpdateMajor | Status::UpdateMinor | Status::UpdatePatch => "version",
_ => "digest",
};
@@ -181,7 +182,8 @@ impl Image {
remote_digest,
})
}
_ => unreachable!(),
"none" => UpdateInfo::None,
_ => unreachable!()
},
},
error: self.error.clone(),