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 +13
-4
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -424,20 +424,29 @@ private void OnGitLfsLocksGUI()
424
424
private void OnInstallPathGUI ( )
425
425
{
426
426
string gitExecPath = null ;
427
+ string gitExecParentPath = null ;
428
+
427
429
string extension = null ;
428
- string gitInstallPath = null ;
430
+
429
431
if ( Environment != null )
430
432
{
431
433
extension = Environment . ExecutableExtension ;
434
+
432
435
if ( Environment . IsWindows )
433
436
{
434
437
extension = extension . TrimStart ( '.' ) ;
435
438
}
436
439
437
- gitInstallPath = Environment . GitInstallPath ;
438
-
439
440
if ( Environment . GitExecutablePath != null )
441
+ {
440
442
gitExecPath = Environment . GitExecutablePath . ToString ( ) ;
443
+ gitExecParentPath = Environment . GitExecutablePath . Parent . ToString ( ) ;
444
+ }
445
+
446
+ if ( gitExecParentPath == null )
447
+ {
448
+ gitExecParentPath = Environment . GitInstallPath ;
449
+ }
441
450
}
442
451
443
452
// Install path
@@ -451,7 +460,7 @@ private void OnInstallPathGUI()
451
460
//TODO: Verify necessary value for a non Windows OS
452
461
Styles . PathField ( ref gitExecPath ,
453
462
( ) => EditorUtility . OpenFilePanel ( GitInstallBrowseTitle ,
454
- gitInstallPath ,
463
+ gitExecParentPath ,
455
464
extension ) , ValidateGitInstall ) ;
456
465
}
457
466
if ( EditorGUI . EndChangeCheck ( ) )
You can’t perform that action at this time.
0 commit comments