Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 8310c7e

Browse files
committed
Fix how the git install and executable paths are set
We want the GitExecutablePath to reflect where the binary was found, and the GitInstallPath to reflect where it is installed. When the binary is a symlink (like /usr/local/bin/git -> ../Cellar/git/2.12.2/bin/git), this means GitExecutablePath will have /usr/local/bin/git and GitInstallPath will have /usr/local/Cellar/git/2.12.2/bin
1 parent b78d62c commit 8310c7e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/GitHub.Api/Git/GitClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private async Task<NPath> LookForSystemGit()
145145
if (path == null)
146146
path = await new FindExecTask("git", taskManager.Token).StartAwait();
147147

148-
return path.Resolve();
148+
return path;
149149
}
150150

151151
public bool ValidateGitInstall(NPath path)

src/GitHub.Api/Platform/DefaultEnvironment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public NPath GitExecutablePath
120120
if (String.IsNullOrEmpty(gitExecutablePath))
121121
GitInstallPath = null;
122122
else
123-
GitInstallPath = GitExecutablePath.Parent.Parent;
123+
GitInstallPath = GitExecutablePath.Resolve().Parent.Parent;
124124
}
125125
}
126126

0 commit comments

Comments
 (0)