Skip to main content

git_stk/commands/
uninstall.rs

1use anyhow::Result;
2use clap::ArgAction;
3
4use crate::commands::Run;
5
6/// Remove what `git stk setup` and the installer added.
7///
8/// Shell completion wiring, the man page, and the config/receipt directory.
9/// The binary itself is reported, not deleted.
10#[derive(Debug, clap::Args)]
11pub struct Uninstall {
12    /// Print what would be removed without removing anything.
13    #[arg(long, short = 'n', action = ArgAction::SetTrue)]
14    dry_run: bool,
15    /// Skip the confirmation prompt.
16    #[arg(long, short = 'y', action = ArgAction::SetTrue)]
17    yes: bool,
18}
19
20impl Run for Uninstall {
21    fn run(self) -> Result<()> {
22        crate::setup::uninstall(self.dry_run, self.yes)
23    }
24}