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 @@ -688,20 +688,29 @@ private void OnGitLfsLocksGUI()
688
688
private void OnInstallPathGUI ( )
689
689
{
690
690
string gitExecPath = null ;
691
+ string gitExecParentPath = null ;
692
+
691
693
string extension = null ;
692
- string gitInstallPath = null ;
694
+
693
695
if ( Environment != null )
694
696
{
695
697
extension = Environment . ExecutableExtension ;
698
+
696
699
if ( Environment . IsWindows )
697
700
{
698
701
extension = extension . TrimStart ( '.' ) ;
699
702
}
700
703
701
- gitInstallPath = Environment . GitInstallPath ;
702
-
703
704
if ( Environment . GitExecutablePath != null )
705
+ {
704
706
gitExecPath = Environment . GitExecutablePath . ToString ( ) ;
707
+ gitExecParentPath = Environment . GitExecutablePath . Parent . ToString ( ) ;
708
+ }
709
+
710
+ if ( gitExecParentPath == null )
711
+ {
712
+ gitExecParentPath = Environment . GitInstallPath ;
713
+ }
705
714
}
706
715
707
716
// Install path
@@ -715,7 +724,7 @@ private void OnInstallPathGUI()
715
724
//TODO: Verify necessary value for a non Windows OS
716
725
Styles . PathField ( ref gitExecPath ,
717
726
( ) => EditorUtility . OpenFilePanel ( GitInstallBrowseTitle ,
718
- gitInstallPath ,
727
+ gitExecParentPath ,
719
728
extension ) , ValidateGitInstall ) ;
720
729
}
721
730
if ( EditorGUI . EndChangeCheck ( ) )
You can’t perform that action at this time.
0 commit comments