From 52db698d05287544b74da2451800868453557dfc Mon Sep 17 00:00:00 2001 From: Penguin Date: Thu, 16 Dec 2021 14:04:30 -0600 Subject: [PATCH] staging --- .gdb_history | 4 ++++ igloo_core/src/igloo_action.rs | 1 + igloo_core/src/igloo_project.rs | 18 ++++++++++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.gdb_history b/.gdb_history index 08a5c61..9deec06 100644 --- a/.gdb_history +++ b/.gdb_history @@ -70,3 +70,7 @@ s s s q +b igloo::main +r +n +q diff --git a/igloo_core/src/igloo_action.rs b/igloo_core/src/igloo_action.rs index 29bf99e..32846a5 100644 --- a/igloo_core/src/igloo_action.rs +++ b/igloo_core/src/igloo_action.rs @@ -63,6 +63,7 @@ pub fn add_target(inst: &Igloo, prj_name: &str, target: &str) -> IglooErrType res_err = ActionCalledOutsideProject; break; } + }break;} diff --git a/igloo_core/src/igloo_project.rs b/igloo_core/src/igloo_project.rs index 3ef28d0..b5e9ee3 100644 --- a/igloo_core/src/igloo_project.rs +++ b/igloo_core/src/igloo_project.rs @@ -44,11 +44,15 @@ impl IglooPrj /// this tests if the requested directory is an igloo project pub fn is_igloo_prj(path: &std::path::PathBuf) -> bool { - let mut ret: bool = false; - println!("{}", path.join(".igloo").display()); - if path.join(".igloo").exists() + let mut ret: bool = true; + if !path.join(".igloo").exists() { - ret = true; + return false; + } + + if !path.join(".igloo").join("project.toml").exists() + { + return false; } return ret; } @@ -219,6 +223,12 @@ impl IglooPrj } } + /// Generates project config file -- project.toml + pub fn gen_project_config(&self) -> IglooErrType + { + IglooErrType::ErrUnknown + + } /// Generates the target directories for all targets pub fn gen_targets(&self) -> IglooErrType {