Add core CLI command structure and subcommands.
This commit is contained in:
1 parent
5c262fe425
commit
70dec5834e
19 files changed
+447
-1
No files matched your search
@@ -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 }
|
||||
}
|
||||
Reference in new issue
Block a user