|
|
@@ -141,16 +141,18 @@ public class FS_POSIX extends FS { |
|
|
|
return resolveGrandparentFile(gitExe); |
|
|
|
|
|
|
|
if (SystemReader.getInstance().isMacOS()) { |
|
|
|
// On MacOSX, PATH is shorter when Eclipse is launched from the |
|
|
|
// Finder than from a terminal. Therefore try to launch bash as a |
|
|
|
// login shell and search using that. |
|
|
|
// |
|
|
|
String w = readPipe(userHome(), // |
|
|
|
new String[] { "bash", "--login", "-c", "which git" }, // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
|
|
|
Charset.defaultCharset().name()); |
|
|
|
if (w == null || w.length() == 0) |
|
|
|
return null; |
|
|
|
return resolveGrandparentFile(new File(w)); |
|
|
|
if (searchPath(path, "bash") != null) { //$NON-NLS-1$ |
|
|
|
// On MacOSX, PATH is shorter when Eclipse is launched from the |
|
|
|
// Finder than from a terminal. Therefore try to launch bash as a |
|
|
|
// login shell and search using that. |
|
|
|
String w = readPipe(userHome(), |
|
|
|
new String[] { "bash", "--login", "-c", "which git" }, // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
|
|
|
Charset.defaultCharset().name()); |
|
|
|
if (w == null || w.length() == 0) |
|
|
|
return null; |
|
|
|
gitExe = new File(w); |
|
|
|
return resolveGrandparentFile(gitExe); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return null; |