Skip to main content

run_delete

Function run_delete 

Source
fn run_delete(
    root: &AppRoot,
    config: &Config,
    agent: &AgentId,
    profile: &ProfileName,
    yes: bool,
) -> Result<i32>
Expand description

<agent> delete <profile> [--yes] (SP5a design §3). An advisory referenced-profile check first, then --yes or an interactive confirmation, then the locked lifecycle::delete. A missing profile exits 0 rather than erroring, because that is the state the user asked for — the same line and code as a profile that vanishes between the check and the lock. The configuration was already refused if invalid by run_command’s load, and is read again under the lock inside lifecycle::delete.