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

Commit 7782fa5

Browse files
Other tweaks to logging
1 parent e05b25a commit 7782fa5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/GitHub.Api/Git/GitClient.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,22 @@ public async Task<NPath> FindGitInstallation()
111111
if (path == null)
112112
path = await LookForSystemGit();
113113

114-
Logger.Trace("Git Installation folder {0} discovered: '{1}'", path == null ? "not" : "", path);
114+
if (path == null)
115+
{
116+
Logger.Trace("Git Installation not discovered");
117+
}
118+
else
119+
{
120+
Logger.Trace("Git Installation discovered: '{0}'", path);
121+
}
115122

116123
return path;
117124
}
118125

119126
private Task<NPath> LookForPortableGit()
120127
{
128+
Logger.Trace("LookForPortableGit");
129+
121130
var gitHubLocalAppDataPath = environment.UserCachePath;
122131
if (!gitHubLocalAppDataPath.DirectoryExists())
123132
return null;
@@ -138,10 +147,13 @@ private Task<NPath> LookForPortableGit()
138147

139148
private async Task<NPath> LookForSystemGit()
140149
{
150+
Logger.Trace("LookForSystemGit");
151+
141152
NPath path = null;
142153
if (!environment.IsWindows)
143154
{
144155
var p = new NPath("/usr/local/bin/git");
156+
145157
if (p.FileExists())
146158
path = p;
147159
}

0 commit comments

Comments
 (0)