Skip to content

Commit

Permalink
remove installer references + fix config stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Oct 11, 2022
1 parent 44564b4 commit f637eed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "geode"
version = "1.0.2"
version = "1.0.3"
authors = ["HJfod <[email protected]>", "Camila314 <[email protected]>"]
edition = "2021"
build = "build.rs"
Expand Down
7 changes: 4 additions & 3 deletions src/util/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ impl Config {
pub fn new() -> Config {
if !geode_root().exists() {
warn!("It seems you don't have Geode installed. Some operations will not work");
info!("You can install geode using the official installer");
info!("At {}", "https://github.com/geode-sdk/installer/releases/latest".bright_cyan());
info!("You can setup Geode using `geode config setup`");

return Config {
current_profile: None,
Expand All @@ -127,6 +126,7 @@ impl Config {
let config_json = geode_root().join("config.json");

let mut output: Config = if !config_json.exists() {
info!("Setup Geode using `geode config setup`");
// Create new config
Config {
current_profile: None,
Expand Down Expand Up @@ -158,7 +158,7 @@ impl Config {

if output.profiles.is_empty() {
warn!("No Geode profiles found! Some operations will be unavailable.");
info!("Install Geode using the official installer (https://github.com/geode-sdk/installer/releases/latest)");
info!("Setup Geode using `geode config setup`");
} else if output.get_profile(&output.current_profile).is_none() {
output.current_profile = Some(output.profiles[0].borrow().name.clone());
}
Expand All @@ -167,6 +167,7 @@ impl Config {
}

pub fn save(&self) {
std::fs::create_dir_all(geode_root()).nice_unwrap("Unable to create Geode directory");
std::fs::write(
geode_root().join("config.json"),
serde_json::to_string(self).unwrap()
Expand Down

0 comments on commit f637eed

Please sign in to comment.