Add core CLI command structure and subcommands.

This commit is contained in:
Overlord committed 2026-10-16 22:24:35 +02:00
1 parent 5c262fe425
commit 70dec5834e
19 files changed
+447 -1

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
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 }
}