fix: make sha generation work with submodules

More specifically, change `is_dir` to `exists` as `.git` is a file when
in a submodule.
This commit is contained in:
dundargoc 2024-10-26 13:40:48 +02:00 committed by dundargoc
parent dc4e232e6e
commit a3de650024
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ fn read_git_sha() -> Option<String> {
if !crate_path
.parent()?
.parent()
.map_or(false, |p| p.join(".git").is_dir())
.map_or(false, |p| p.join(".git").exists())
{
return None;
}