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 +9
-6
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,7 @@ public override void OnGUI()
95
95
96
96
GUI . FocusControl ( null ) ;
97
97
98
- Manager . SystemSettings . Set ( Constants . GitInstallPathKey , newGitExec ) ;
99
- Environment . GitExecutablePath = newGitExec . ToNPath ( ) ;
100
- gitExecHasChanged = true ;
98
+ ValidateAndSetGitInstallPath ( newGitExec ) ;
101
99
}
102
100
}
103
101
EditorGUI . EndDisabledGroup ( ) ;
@@ -130,9 +128,7 @@ public override void OnGUI()
130
128
131
129
if ( success )
132
130
{
133
- Manager . SystemSettings . Set ( Constants . GitInstallPathKey , path ) ;
134
- Environment . GitExecutablePath = path ;
135
- gitExecHasChanged = true ;
131
+ ValidateAndSetGitInstallPath ( path ) ;
136
132
}
137
133
138
134
isBusy = false ;
@@ -144,6 +140,13 @@ public override void OnGUI()
144
140
EditorGUI . EndDisabledGroup ( ) ;
145
141
}
146
142
143
+ private void ValidateAndSetGitInstallPath ( string value )
144
+ {
145
+ Manager . SystemSettings . Set ( Constants . GitInstallPathKey , value ) ;
146
+ Environment . GitExecutablePath = value . ToNPath ( ) ;
147
+ gitExecHasChanged = true ;
148
+ }
149
+
147
150
private void MaybeUpdateData ( )
148
151
{
149
152
if ( gitExecHasChanged )
You can’t perform that action at this time.
0 commit comments