Add repo_builder fail safe

This commit is contained in:
Wildan M 2025-12-14 23:53:40 +07:00
parent fec4236903
commit c449427ec4
No known key found for this signature in database
GPG Key ID: 01AC53185C679C79

View File

@ -1,4 +1,4 @@
use anyhow::anyhow;
use anyhow::{anyhow, bail};
use cookbook::WALK_DEPTH;
use cookbook::cook::ident::{get_ident, init_ident};
use cookbook::cook::{fetch, package as cook_package};
@ -75,6 +75,11 @@ fn publish_packages(config: &CliConfig) -> anyhow::Result<()> {
WALK_DEPTH,
);
if recipe_list.len() == 0 {
// Fail-Safe
bail!("Zero packages are passing the build");
}
let mut appstream_sources: HashMap<String, PathBuf> = HashMap::new();
let mut packages: BTreeMap<String, String> = BTreeMap::new();
let mut outdated_packages: BTreeMap<String, SourceIdentifier> = BTreeMap::new();