Skip to content

Commit 6662d30

Browse files
committed
updata: fix fetching max version in remove-update
- When running the remove-update command it would report the max version available in the manifest. But it is checking the wrong order so that the latest version is not correctly reported. This is a simple fix for that. Signed-off-by: Yutong Sun <[email protected]>
1 parent d5eb9db commit 6662d30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sources/updater/updog/src/bin/updata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl RemoveUpdateArgs {
118118
});
119119
// Note: We don't revert the maximum version on removal
120120
update_metadata::write_file(&self.file, &manifest)?;
121-
if let Some(current) = manifest.updates.first() {
121+
if let Some(current) = manifest.updates.last() {
122122
info!(
123123
"Update {}-{}-{} removed. Current maximum version: {}",
124124
self.arch, self.variant, self.image_version, current.version

0 commit comments

Comments
 (0)