diff --git a/src/command/nix_info.rs b/src/command/nix_info.rs index a4c0643..8857d5b 100644 --- a/src/command/nix_info.rs +++ b/src/command/nix_info.rs @@ -1,14 +1,22 @@ -use clap::{ArgMatches, Command as ClapCommand}; +use clap::{ArgMatches, Args, FromArgMatches, Command}; use crate::error::ColmenaError; use crate::nix::evaluator::nix_eval_jobs::get_pinned_nix_eval_jobs; use crate::nix::NixCheck; -pub fn subcommand() -> ClapCommand { - ClapCommand::new("nix-info").about("Show information about the current Nix installation") +#[derive(Debug, Args)] +#[command( + name = "nix-info", + about = "Show information about the current Nix installation" +)] +pub struct Opts {} + +pub fn subcommand() -> Command { + Opts::augment_args(Command::new("nix-info")) } -pub async fn run(_global_args: &ArgMatches, _local_args: &ArgMatches) -> Result<(), ColmenaError> { +pub async fn run(_global_args: &ArgMatches, local_args: &ArgMatches) -> Result<(), ColmenaError> { + let Opts {} = Opts::from_arg_matches(local_args).unwrap(); let check = NixCheck::detect().await; check.print_version_info(); check.print_flakes_info(false);