Files
keel/src/cli/command.rs
T
2026-10-17 01:38:34 +02:00

14 lines
346 B
Rust

use super::Exit;
/// A subcommand that keel can run.
pub trait Command
{
fn run(&self) -> anyhow::Result<Exit>;
/// 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 }
}