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()
424424 private void OnInstallPathGUI ( )
425425 {
426426 string gitExecPath = null ;
427+ string gitExecParentPath = null ;
428+
427429 string extension = null ;
428- string gitInstallPath = null ;
430+
429431 if ( Environment != null )
430432 {
431433 extension = Environment . ExecutableExtension ;
434+
432435 if ( Environment . IsWindows )
433436 {
434437 extension = extension . TrimStart ( '.' ) ;
435438 }
436439
437- gitInstallPath = Environment . GitInstallPath ;
438-
439440 if ( Environment . GitExecutablePath != null )
441+ {
440442 gitExecPath = Environment . GitExecutablePath . ToString ( ) ;
443+ gitExecParentPath = Environment . GitExecutablePath . Parent . ToString ( ) ;
444+ }
445+
446+ if ( gitExecParentPath == null )
447+ {
448+ gitExecParentPath = Environment . GitInstallPath ;
449+ }
441450 }
442451
443452 // Install path
@@ -451,7 +460,7 @@ private void OnInstallPathGUI()
451460 //TODO: Verify necessary value for a non Windows OS
452461 Styles . PathField ( ref gitExecPath ,
453462 ( ) => EditorUtility . OpenFilePanel ( GitInstallBrowseTitle ,
454- gitInstallPath ,
463+ gitExecParentPath ,
455464 extension ) , ValidateGitInstall ) ;
456465 }
457466 if ( EditorGUI . EndChangeCheck ( ) )
You can’t perform that action at this time.
0 commit comments