git_stk/commands/
upgrade.rs1use anyhow::Result;
2use clap::ArgAction;
3
4use crate::commands::Run;
5
6#[derive(Debug, clap::Args)]
8pub struct Upgrade {
9 #[arg(long, action = ArgAction::SetTrue, conflicts_with = "force")]
11 head: bool,
12 #[arg(long, action = ArgAction::SetTrue)]
14 force: bool,
15 #[arg(long, short = 'y', action = ArgAction::SetTrue, requires = "head")]
17 yes: bool,
18}
19
20impl Run for Upgrade {
21 fn run(self) -> Result<()> {
22 crate::upgrade::upgrade(self.head, self.force, self.yes)
23 }
24}