improve formatting of 'show'

This commit is contained in:
Dr. Matthias Ratajczak
2023-02-02 15:25:45 +01:00
parent 7ebd3a6c43
commit b9632ee8c2
3 changed files with 18 additions and 2 deletions
+5 -1
View File
@@ -2,7 +2,7 @@ use std::collections::HashSet;
use std::iter::Peekable;
use std::vec::IntoIter;
use anyhow::{Context, Result};
use anyhow::{bail, Context, Result};
use clap::ArgMatches;
use regex::Regex;
@@ -27,6 +27,10 @@ pub(crate) fn search_packages(args: &ArgMatches, groups: &HashSet<Group>) -> Res
}
}
if vec.is_empty() {
bail!("no packages matching query")
}
print_triples(vec);
Ok(())