We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dc1b4a commit 8cd97dbCopy full SHA for 8cd97db
crates/config/src/utils.rs
@@ -35,7 +35,7 @@ pub fn load_config_with_root(root: Option<&Path>) -> eyre::Result<Config> {
35
pub fn find_git_root(relative_to: &Path) -> io::Result<Option<PathBuf>> {
36
let root =
37
if relative_to.is_absolute() { relative_to } else { &dunce::canonicalize(relative_to)? };
38
- Ok(root.ancestors().find(|p| p.join(".git").is_dir()).map(Path::to_path_buf))
+ Ok(root.ancestors().find(|p| p.join(".git").exists()).map(Path::to_path_buf))
39
}
40
41
/// Returns the root path to set for the project root.
0 commit comments