fix(runtime_deps_of): do not error out if no packages are specified

This may be the case if repo.sh did not build any TOML recipes. In that
case, we can just exit cleanly.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
This commit is contained in:
Anhad Singh 2025-02-02 16:55:14 +11:00
parent 78bf3a68fc
commit 5b6e0ebe35
No known key found for this signature in database
GPG Key ID: 80E0357347554B89

View File

@ -5,15 +5,10 @@ use std::{env::args, process::ExitCode};
const DEP_DEPTH: usize = 16;
fn usage() {
eprintln!("Usage: pkg_deps_of package1 [package2 ...]");
eprintln!("Usage: pkg_deps_of [package1 package2 ...]");
}
fn main() -> ExitCode {
if args().len() < 2 {
usage();
return ExitCode::FAILURE;
}
let names = args().skip(1).collect::<Vec<String>>();
let recipes = CookRecipe::new_recursive(&names, DEP_DEPTH, true).expect("recipe not found");