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

Commit 44c7bb7

Browse files
Starting the task and handling isBusy
1 parent 19bae77 commit 44c7bb7

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/GitHub.Api/Helpers/Constants.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ static class Constants
88
public const string GitInstallPathKey = "GitInstallPath";
99
public const string TraceLoggingKey = "EnableTraceLogging";
1010

11-
public static readonly SoftwareVersion MinimumGitVersion = new SoftwareVersion(2, 1, 0);
12-
public static readonly SoftwareVersion MinimumGitLfsVersion = new SoftwareVersion(2, 1, 0);
11+
public static readonly SoftwareVersion MinimumGitVersion = new SoftwareVersion(2, 12, 2);
12+
public static readonly SoftwareVersion MinimumGitLfsVersion = new SoftwareVersion(2, 0, 2);
1313
}
1414
}

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ public override void OnGUI()
9191
{
9292
if (GUILayout.Button(GitPathSaveButton, GUILayout.ExpandWidth(false)))
9393
{
94-
Logger.Trace("Saving Git Path:{0}", newGitExec);
95-
9694
GUI.FocusControl(null);
9795

9896
ValidateAndSetGitInstallPath(newGitExec);
@@ -130,8 +128,6 @@ public override void OnGUI()
130128
{
131129
ValidateAndSetGitInstallPath(path);
132130
}
133-
134-
isBusy = false;
135131
}).Start();
136132
}
137133
}
@@ -142,24 +138,30 @@ public override void OnGUI()
142138

143139
private void ValidateAndSetGitInstallPath(string value)
144140
{
145-
GitClient.ValidateGitInstall(value).Then((sucess, result) => {
141+
Logger.Trace("Validating Git Path:{0}", value);
142+
143+
GitClient.ValidateGitInstall(value).ThenInUI((sucess, result) => {
146144
if (!sucess)
147145
{
148146
Logger.Trace("Error getting software versions");
147+
isBusy = false;
149148
return;
150149
}
151150

152151
if (!result.IsValid)
153152
{
154153
Logger.Warning("Software versions do not meet minimums Git:{0} GitLfs:{1}", result.GitVersionTask, result.GitLfsVersionTask);
154+
isBusy = false;
155155
return;
156156
}
157157

158158
Manager.SystemSettings.Set(Constants.GitInstallPathKey, value);
159159
Environment.GitExecutablePath = value.ToNPath();
160160

161161
gitExecHasChanged = true;
162-
});
162+
isBusy = false;
163+
164+
}).Start();
163165
}
164166

165167
private void MaybeUpdateData()

0 commit comments

Comments
 (0)