Skip to content

Commit

Permalink
fix(list): fix oma list get upgradable item will panic (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
eatradish authored Jan 23, 2025
1 parent 527ad94 commit 12ac865
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/subcommand/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,9 @@ impl CliExecuter for List {
"{}/{} {} {arch} {s}",
color_formatter().color_str(&name, Action::Emphasis).bold(),
color_formatter().color_str(branches_str, Action::Secondary),
if upgradable {
version_str = Cow::Owned(format!(
"{} -> {}",
version_str,
new_version.as_ref().unwrap(),
));
if let Some(new_version) = new_version {
version_str =
Cow::Owned(format!("{} -> {}", version_str, new_version));
color_formatter().color_str(version_str, Action::WARN)
} else {
color_formatter().color_str(version_str, Action::EmphasisSecondary)
Expand Down

0 comments on commit 12ac865

Please sign in to comment.