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

Commit 3814bc1

Browse files
Merge branch 'fixes/git-path-find-button' into enhancements/git-path-view
2 parents 5aa1eef + cb1ca4c commit 3814bc1

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/GitPathView.cs

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,32 @@ public override void OnGUI()
107107
{
108108
GUI.FocusControl(null);
109109

110-
var task = new ProcessTask<NPath>(Manager.CancellationToken, new FirstLineIsPathOutputProcessor())
110+
new ProcessTask<NPath>(Manager.CancellationToken, new FirstLineIsPathOutputProcessor())
111111
.Configure(Manager.ProcessManager, Environment.IsWindows ? "where" : "which", "git")
112112
.FinallyInUI((success, ex, path) =>
113113
{
114-
Logger.Trace("Find Git Completed Success:{0} Path:{1}", success, path);
114+
if (success)
115+
{
116+
Logger.Trace("FindGit Path:{0}", path);
117+
}
118+
else
119+
{
120+
if (ex != null)
121+
{
122+
Logger.Error(ex, "FindGit Error Path:{0}", path);
123+
}
124+
else
125+
{
126+
Logger.Error("FindGit Failed Path:{0}", path);
127+
}
128+
}
115129

116-
if (success && !string.IsNullOrEmpty(path))
130+
if (success)
117131
{
118132
Manager.SystemSettings.Set(Constants.GitInstallPathKey, path);
119133
Environment.GitExecutablePath = path;
120-
gitExecHasChanged = true;
121134
}
122-
});
135+
}).Start();
123136
}
124137
}
125138
GUILayout.EndHorizontal();

0 commit comments

Comments
 (0)