From 5b6e0ebe3532ae2e3438ea41f99b983f13eb2c01 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Sun, 2 Feb 2025 16:55:14 +1100 Subject: [PATCH] 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 --- src/bin/runtime_deps_of.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/bin/runtime_deps_of.rs b/src/bin/runtime_deps_of.rs index 7edc25ba..52f0e6b5 100644 --- a/src/bin/runtime_deps_of.rs +++ b/src/bin/runtime_deps_of.rs @@ -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::>(); let recipes = CookRecipe::new_recursive(&names, DEP_DEPTH, true).expect("recipe not found");