mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-09 11:14:20 +01:00
Merge 'sim: use 'git rev-parse --show-toplevel' for getting base dir' from Jussi Saurio
The current `get_limbo_project_dir()` does not work from git worktrees Closes #2684
This commit is contained in:
@@ -463,15 +463,13 @@ impl BugBase {
|
||||
Ok(PathBuf::from(
|
||||
String::from_utf8(
|
||||
Command::new("git")
|
||||
.args(["rev-parse", "--git-dir"])
|
||||
.args(["rev-parse", "--show-toplevel"])
|
||||
.output()
|
||||
.with_context(|| "should be able to get the git path")?
|
||||
.stdout,
|
||||
)
|
||||
.with_context(|| "commit hash should be valid utf8")?
|
||||
.trim()
|
||||
.strip_suffix(".git")
|
||||
.with_context(|| "should be able to strip .git suffix")?,
|
||||
.trim(),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user