This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +25
-4
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -478,16 +478,37 @@ private void OnInstallPathGUI()
478
478
// Find button - for attempting to locate a new install
479
479
if ( GUILayout . Button ( GitInstallFindButton , GUILayout . ExpandWidth ( false ) ) )
480
480
{
481
- var task = new ProcessTask < NPath > ( Manager . CancellationToken , new FirstLineIsPathOutputProcessor ( ) )
481
+ GUI . FocusControl ( null ) ;
482
+ isBusy = true ;
483
+
484
+ new ProcessTask < NPath > ( Manager . CancellationToken , new FirstLineIsPathOutputProcessor ( ) )
482
485
. Configure ( Manager . ProcessManager , Environment . IsWindows ? "where" : "which" , "git" )
483
486
. FinallyInUI ( ( success , ex , path ) =>
484
487
{
485
- if ( success && ! string . IsNullOrEmpty ( path ) )
488
+ if ( success )
489
+ {
490
+ Logger . Trace ( "FindGit Path:{0}" , path ) ;
491
+ }
492
+ else
486
493
{
494
+ if ( ex != null )
495
+ {
496
+ Logger . Error ( ex , "FindGit Error Path:{0}" , path ) ;
497
+ }
498
+ else
499
+ {
500
+ Logger . Error ( "FindGit Failed Path:{0}" , path ) ;
501
+ }
502
+ }
503
+
504
+ if ( success )
505
+ {
506
+ Manager . SystemSettings . Set ( Constants . GitInstallPathKey , path ) ;
487
507
Environment . GitExecutablePath = path ;
488
- GUIUtility . keyboardControl = GUIUtility . hotControl = 0 ;
489
508
}
490
- } ) ;
509
+
510
+ isBusy = false ;
511
+ } ) . Start ( ) ;
491
512
}
492
513
}
493
514
GUILayout . EndHorizontal ( ) ;
You can’t perform that action at this time.
0 commit comments