aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-02-08 22:57:30 +0000
committerFuwn <[email protected]>2025-06-09 07:46:04 +0000
commiteaa3fc79d8eaca2afb8d074edf655cb505df2377 (patch)
tree197022edd120d9b5c5a17a9f823ad2894d34c5d8
parentfeat(divina): pre-release :star: (diff)
downloaddivina-eaa3fc79d8eaca2afb8d074edf655cb505df2377.tar.xz
divina-eaa3fc79d8eaca2afb8d074edf655cb505df2377.zip
fix(cli): better init pathing
-rw-r--r--crates/divina/src/cli.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/divina/src/cli.rs b/crates/divina/src/cli.rs
index 6034b38..6a843b7 100644
--- a/crates/divina/src/cli.rs
+++ b/crates/divina/src/cli.rs
@@ -18,7 +18,6 @@ fn cli() -> App<'static, 'static> {
.possible_values(&["bin", "lib"]),
Arg::with_name("git").long("git").takes_value(true),
Arg::with_name("path")
- .required(true)
.index(1)
.takes_value(true),
]),
@@ -48,7 +47,7 @@ pub fn execute(divina: &mut crate::Divina) {
let repository = s_matches
.value_of("git")
.unwrap_or("https://github.com/divinaland/init.git");
- let path = s_matches.value_of("path").unwrap_or_else(|| unreachable!());
+ let path = s_matches.value_of("path").unwrap_or(".");
divina_git::clone(repository, &format!("./{}", path))
.expect("!! could to clone init repository, perhaps the repository is invalid ?");