From 588d27739afa4f9452b7d22c7a782c19dd0576b6 Mon Sep 17 00:00:00 2001 From: Ottomated Date: Fri, 3 Mar 2023 20:31:20 -0800 Subject: [PATCH] feat: Install dependencies before git init --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/create/mod.rs | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 82fb01c9..5aa9f7fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,7 +34,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "create-o7-app" -version = "0.1.4" +version = "0.1.5" dependencies = [ "anyhow", "crossterm 0.26.0", diff --git a/Cargo.toml b/Cargo.toml index 1d783120..f934c390 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "create-o7-app" -version = "0.1.4" +version = "0.1.5" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/create/mod.rs b/src/create/mod.rs index cac74121..7ee75914 100644 --- a/src/create/mod.rs +++ b/src/create/mod.rs @@ -36,6 +36,11 @@ pub fn create(input: UserInput) -> Result<()> { create_package_json(&input)?; log_step_end(start); + let install_deps_res = install_deps(&input); + if let Err(e) = &install_deps_res { + log_step_error(e); + } + let create_repo_res = create_repo(&input); let git_error = match &create_repo_res { Ok(_) => None, @@ -45,11 +50,6 @@ pub fn create(input: UserInput) -> Result<()> { } }; - let install_deps_res = install_deps(&input); - if let Err(e) = &install_deps_res { - log_step_error(e); - } - next_steps::print(&input, git_error, install_deps_res.is_ok()); Ok(())