Skip to content

Commit 980823e

Browse files
committed
CIHelper: do set the GIT_EXEC_PATH correctly
In 7d538e5 (CIHelper: add a convenient function to initialize e.g. the Git worktree, 2025-08-15), I added logic to find the `git` executable on the `PATH`, and to appease the `dugite` module whose Git functionality GitGitGadget uses, set `GIT_EXEC_PATH` accordingly. Unfortunately, I made a mistake and auto-piloted `/usr/bin/git` into the call that was supposed to determine the correct `GIT_EXEC_PATH`, when really, I wanted to use the just-found `git` executable instead. Let's fix that mistake. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 153badf commit 980823e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ci-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class CIHelper {
8686
// see https://github.com/desktop/dugite/blob/v2.7.1/lib/git-environment.ts#L44-L64
8787
// Also: We cannot use `await git(["--exec-path"]);` because that would use Dugite, which would
8888
// override `GIT_EXEC_PATH` and then `git --exec-path` would report _that_...
89-
process.env.GIT_EXEC_PATH = spawnSync("/usr/bin/git", ["--exec-path"]).stdout.toString("utf-8").trimEnd();
89+
process.env.GIT_EXEC_PATH = spawnSync(gitPath, ["--exec-path"]).stdout.toString("utf-8").trimEnd();
9090
break;
9191
}
9292

0 commit comments

Comments
 (0)