From e6dd366498f73fbdae400714de795e40f9010a1e Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:46:12 +0300 Subject: [PATCH] add default sdk path on windows --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/sdk.rs | 12 +++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6d2087..3dc1d21 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -575,7 +575,7 @@ dependencies = [ [[package]] name = "geode" -version = "1.0.3" +version = "1.0.4" dependencies = [ "clap", "colored", diff --git a/Cargo.toml b/Cargo.toml index 56ff8b8..43a14a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "geode" -version = "1.0.3" +version = "1.0.4" authors = ["HJfod ", "Camila314 "] edition = "2021" build = "build.rs" diff --git a/src/sdk.rs b/src/sdk.rs index 23f0283..96233d4 100644 --- a/src/sdk.rs +++ b/src/sdk.rs @@ -335,13 +335,15 @@ pub fn subcommand(config: &mut Config, cmd: Sdk) { } } - let default_path = if cfg!(target_os = "macos") { + install(config, path.unwrap_or(if cfg!(target_os = "macos") { PathBuf::from("/Users/Shared/Geode/sdk") } else { - todo!(); - }; - - install(config, path.unwrap_or(default_path)); + dirs::document_dir() + .nice_unwrap( + "No default path available! \ + Please provide a path manually" + ).join("Geode") + })); }, Sdk::Uninstall => { uninstall(config); }, Sdk::Update { branch } => update(config, branch),