mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-08-18 13:03:28 +02:00
feat: rename projects to point to github/kjuulh/dagger-sdk
This commit is contained in:
26
crates/dagger-bootstrap/src/cli.rs
Normal file
26
crates/dagger-bootstrap/src/cli.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use crate::cli_generate;
|
||||
|
||||
pub struct Cli {
|
||||
cmd: clap::Command,
|
||||
}
|
||||
|
||||
impl Cli {
|
||||
pub fn new() -> eyre::Result<Self> {
|
||||
Ok(Self {
|
||||
cmd: clap::Command::new("dagger-rust")
|
||||
.subcommand_required(true)
|
||||
.subcommand(cli_generate::GenerateCommand::new_cmd()),
|
||||
})
|
||||
}
|
||||
|
||||
pub async fn execute(self, args: &[&str]) -> eyre::Result<()> {
|
||||
let matches = self.cmd.get_matches_from(args);
|
||||
|
||||
match matches.subcommand() {
|
||||
Some(("generate", args)) => cli_generate::GenerateCommand::exec(args).await?,
|
||||
_ => eyre::bail!("command missing"),
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user