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()
478478 // Find button - for attempting to locate a new install
479479 if ( GUILayout . Button ( GitInstallFindButton , GUILayout . ExpandWidth ( false ) ) )
480480 {
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 ( ) )
482485 . Configure ( Manager . ProcessManager , Environment . IsWindows ? "where" : "which" , "git" )
483486 . FinallyInUI ( ( success , ex , path ) =>
484487 {
485- if ( success && ! string . IsNullOrEmpty ( path ) )
488+ if ( success )
489+ {
490+ Logger . Trace ( "FindGit Path:{0}" , path ) ;
491+ }
492+ else
486493 {
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 ) ;
487507 Environment . GitExecutablePath = path ;
488- GUIUtility . keyboardControl = GUIUtility . hotControl = 0 ;
489508 }
490- } ) ;
509+
510+ isBusy = false ;
511+ } ) . Start ( ) ;
491512 }
492513 }
493514 GUILayout . EndHorizontal ( ) ;
You can’t perform that action at this time.
0 commit comments