From 5b9bedfe66412551bfb673316cc27ebc2ada6810 Mon Sep 17 00:00:00 2001 From: Marcelo Hernandez Lopez Date: Wed, 14 Feb 2024 23:09:25 -0500 Subject: [PATCH] new: `new-template-dir` option --- src/cli.rs | 4 ++-- src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index fe16fb4..266cdb3 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -16,8 +16,8 @@ pub struct Atmpt { #[arg(short = 'n', long, hide_env = true, env = ALWAYS_DELETE_KEY, help = "Delete project on exit")] pub delete: bool, - #[arg(long, hide = true, env = TEMPLATE_DIR_KEY)] // override template dir - pub template_dir: Option, + #[arg(long, hide_env = true, env = TEMPLATE_DIR_KEY, help = "Override template dir")] + pub new_template_dir: Option, } #[derive(Debug, Parser)] diff --git a/src/main.rs b/src/main.rs index a6f91a4..cb8e70e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,7 +14,7 @@ fn main() -> anyhow::Result<()> { let req = args.required; let mut data_dir = Cow::Borrowed(dirs.data_dir()); - if let Some(new_dir) = args.template_dir { + if let Some(new_dir) = args.new_template_dir { data_dir = Cow::Owned(PathBuf::from(new_dir)); };