Skip to content

Commit 76a7669

Browse files
Merge pull request #861 from filecoin-project/feat/cache-vec
refactor(storage-proofs): streamline expander parents cache
2 parents 4a2f529 + 233c63c commit 76a7669

File tree

2 files changed

+197
-137
lines changed

2 files changed

+197
-137
lines changed

fil-proofs-tooling/src/metadata.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ pub struct GitMetadata {
3232

3333
impl GitMetadata {
3434
pub fn new() -> Result<Self, Error> {
35-
let repo_path = std::env::var("CARGO_MANIFEST_DIR")?;
35+
let repo_path = if let Ok(mdir) = std::env::var("CARGO_MANIFEST_DIR") {
36+
std::path::Path::new(&mdir).into()
37+
} else {
38+
std::env::current_dir()?
39+
};
3640
let repo = Repository::discover(&repo_path)?;
3741
let head = repo.head()?;
3842
let commit = head.peel_to_commit()?;

0 commit comments

Comments
 (0)