From e6adb8992b7b0c9e7497df3ec0493e0a65322ef2 Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Wed, 20 Aug 2025 09:58:21 +0300 Subject: [PATCH] sim: use 'git rev-parse --show-toplevel' for getting base dir --- simulator/runner/bugbase.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/simulator/runner/bugbase.rs b/simulator/runner/bugbase.rs index 915c138b8..1a3be5889 100644 --- a/simulator/runner/bugbase.rs +++ b/simulator/runner/bugbase.rs @@ -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(), )) } }