Skip to content

Commit

Permalink
chore: merge pull request #17 from websublime/feature/change
Browse files Browse the repository at this point in the history
chore: change order for looking files
  • Loading branch information
miguelramos authored Jul 19, 2024
2 parents 6519d48 + 791d897 commit 0684e63
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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 = "workspace-node-tools"
version = "1.0.5"
version = "1.0.6"
edition = "2021"
description = "Node workspace version tools"
repository = "https://github.com/websublime/workspace-node-tools"
Expand Down
4 changes: 2 additions & 2 deletions src/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ pub fn get_project_root_path(root: Option<PathBuf>) -> Option<String> {
};
let current_path = current_dir.as_path();

let git_root_dir = get_git_root_dir(&current_path);
let git_root_dir = walk_reverse_dir(&current_path);

let project_root = match git_root_dir {
Some(current) => current,
None => {
let search_root = walk_reverse_dir(&current_path);
let search_root = get_git_root_dir(&current_path);
search_root.unwrap_or(current_path.to_str().unwrap().to_string())
}
};
Expand Down

0 comments on commit 0684e63

Please sign in to comment.