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 +18
-5
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -107,19 +107,32 @@ public override void OnGUI()
107
107
{
108
108
GUI . FocusControl ( null ) ;
109
109
110
- var task = new ProcessTask < NPath > ( Manager . CancellationToken , new FirstLineIsPathOutputProcessor ( ) )
110
+ new ProcessTask < NPath > ( Manager . CancellationToken , new FirstLineIsPathOutputProcessor ( ) )
111
111
. Configure ( Manager . ProcessManager , Environment . IsWindows ? "where" : "which" , "git" )
112
112
. FinallyInUI ( ( success , ex , path ) =>
113
113
{
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
+ }
115
129
116
- if ( success && ! string . IsNullOrEmpty ( path ) )
130
+ if ( success )
117
131
{
118
132
Manager . SystemSettings . Set ( Constants . GitInstallPathKey , path ) ;
119
133
Environment . GitExecutablePath = path ;
120
- gitExecHasChanged = true ;
121
134
}
122
- } ) ;
135
+ } ) . Start ( ) ;
123
136
}
124
137
}
125
138
GUILayout . EndHorizontal ( ) ;
You can’t perform that action at this time.
0 commit comments