#![allow(unused)]
use crate::cli::Commands;
use clap::Parser;
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
pub struct Args {
#[command(subcommand)]
command: Commands,
#[arg(long)]
debug_log: bool,
}
impl Args {
pub fn read_file(&self) -> bool {
!matches!(self.command, Commands::Init | Commands::New(_))
}
pub fn debug_new(project_name: &str) -> Self {
let command = Commands::debug_new(project_name);
let debug_log = false;
Self { command, debug_log }
}
pub fn debug_build() -> Self {
let command = Commands::debug_build();
let debug_log = false;
Self { command, debug_log }
}
pub fn command(&self) -> &Commands {
&self.command
}
pub fn debug_log(&self) -> bool {
self.debug_log
}
}