use super::Exit; /// A subcommand that keel can run. pub trait Command { fn run(&self) -> anyhow::Result; /// The exit status used when `run` returns an error. /// /// Hook subcommands return `Exit::Ok` here, so an /// internal error never aborts a pacman transaction. fn on_error(&self) -> Exit { Exit::Error } }