-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershacktoberfestIssues designed for hacktoberfestIssues designed for hacktoberfest
Description
The current implementation only searches the config file in pwd, home folder and argument, But git and other tools as the capability of searching config files and folders in parent folders in case someone move out of the config file folder.
Note: This will need a depth value for stop at a given iteration
Function that will handle this:
Lines 81 to 92 in ac7cfe0
fn get_config_path() -> Result<PathBuf> { | |
let current_dir = std::env::current_dir()?; | |
let current_file = current_dir.join("commit.json"); | |
if current_file.is_file() { | |
Ok(current_file) | |
} else { | |
let config_file = dirs::config_dir() | |
.ok_or_else(|| anyhow!("Could not find config directory"))? | |
.join("commit/commit.json"); | |
Ok(config_file) | |
} | |
} |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershacktoberfestIssues designed for hacktoberfestIssues designed for hacktoberfest