Skip to main content

run_with_args

Function run_with_args 

Source
pub fn run_with_args<I, T>(args: I) -> ExitCode
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Expand description

Run the CLI with an explicit argument iterable. Useful for testing and embedding. Accepts any IntoIterator<Item = T> where T: Into<OsString> + Clone, matching the bound of clap::Parser::try_parse_from. In practice, arrays of &str (e.g. ["djogi", "migrations", "compose"]) and Vec<String> both satisfy this bound. Falls back to djogi::migrate::InventoryDescriptorProvider for descriptors.