Skip to main content

solar_core/subcommand/
upgrade.rs

1use clap::Parser;
2
3use crate::{Action, SolarError, Tool};
4
5#[derive(Parser, Clone)]
6pub struct Upgrade {
7    /// The name of the tool to upgrade. If none is provided, defaults to all tools.
8    #[command(subcommand)]
9    tool: Tool,
10}
11
12impl Upgrade {
13    pub fn run(&mut self) -> Result<(), SolarError> {
14        self.tool.act(&Action::UPGRADE, None)
15    }
16}