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:
parent
dc4e232e6e
commit
a3de650024
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue