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

Commit da57a31

Browse files
Adding logging to capture the net effect
1 parent ffc1d53 commit da57a31

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

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

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,12 +737,30 @@ private void OnInstallPathGUI()
737737
.Configure(Manager.ProcessManager, Environment.IsWindows ? "where" : "which", "git")
738738
.FinallyInUI((success, ex, path) =>
739739
{
740+
if (success)
741+
{
742+
Logger.Trace("FindProcess Completed Path:{1}", success, path);
743+
}
744+
else
745+
{
746+
if (ex != null)
747+
{
748+
Logger.Error(ex, "FindProcess Error Path:{1}", success, path);
749+
}
750+
else
751+
{
752+
Logger.Error("FindProcess Failed Path:{1}", success, path);
753+
}
754+
}
755+
740756
if (success && !string.IsNullOrEmpty(path))
741757
{
742-
Environment.GitExecutablePath = path;
743758
GUIUtility.keyboardControl = GUIUtility.hotControl = 0;
759+
760+
Manager.SystemSettings.Set(Constants.GitInstallPathKey, gitExecPath);
761+
Environment.GitExecutablePath = gitExecPath.ToNPath();
744762
}
745-
});
763+
}).Start();
746764
}
747765
}
748766
GUILayout.EndHorizontal();

0 commit comments

Comments
 (0)