From 4ce2714da1f079e81b6887b52b1acfbc283a3d63 Mon Sep 17 00:00:00 2001 From: mo8it Date: Mon, 22 Apr 2024 00:38:34 +0200 Subject: Add --no-git --- src/dev.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/dev.rs') diff --git a/src/dev.rs b/src/dev.rs index 68777d1..d7f9af6 100644 --- a/src/dev.rs +++ b/src/dev.rs @@ -11,7 +11,11 @@ mod update; #[derive(Subcommand)] pub enum DevCommands { - New { path: PathBuf }, + New { + path: PathBuf, + #[arg(long)] + no_git: bool, + }, Check, Update, } @@ -19,12 +23,12 @@ pub enum DevCommands { impl DevCommands { pub fn run(self) -> Result<()> { match self { - DevCommands::New { path } => { + DevCommands::New { path, no_git } => { if DEBUG_PROFILE { bail!("Disabled in the debug build"); } - new::new(&path).context(INIT_ERR) + new::new(&path, no_git).context(INIT_ERR) } DevCommands::Check => check::check(), DevCommands::Update => update::update(), -- cgit v1.2.3