mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-04-07 04:10:55 +01:00
22 lines
581 B
Rust
22 lines
581 B
Rust
use clap::Subcommand;
|
|
|
|
mod default_index;
|
|
mod scripts_repo;
|
|
|
|
#[derive(Debug, Subcommand)]
|
|
pub enum ConfigCommands {
|
|
/// Configuration for the default index
|
|
DefaultIndex(default_index::DefaultIndexCommand),
|
|
|
|
/// Configuration for the scripts repository
|
|
ScriptsRepo(scripts_repo::ScriptsRepoCommand),
|
|
}
|
|
|
|
impl ConfigCommands {
|
|
pub fn run(self) -> anyhow::Result<()> {
|
|
match self {
|
|
ConfigCommands::DefaultIndex(default_index) => default_index.run(),
|
|
ConfigCommands::ScriptsRepo(scripts_repo) => scripts_repo.run(),
|
|
}
|
|
}
|
|
}
|