Skip to main content

run_selection

Function run_selection 

Source
pub fn run_selection(
    prompter: &dyn Prompter,
    branches: &[String],
    clis: &[CliInfo],
    cli_flag: Option<&str>,
    branches_flag: Option<&[String]>,
) -> Result<SelectionResult, PawError>
Expand description

Runs the full interactive selection flow, skipping prompts when CLI flags provide the necessary data.

§Errors

Returns PawError::NoCLIsFound if clis is empty. Returns PawError::BranchError if branches is empty. Returns PawError::UserCancelled if the user cancels any prompt.