|
|
@ -64,9 +64,6 @@ class FS_Win32 extends FS { |
|
|
|
&& StringUtils.toLowerCase(osDotName).indexOf("windows") != -1; |
|
|
|
&& StringUtils.toLowerCase(osDotName).indexOf("windows") != -1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private File gitPrefix; |
|
|
|
|
|
|
|
private boolean gitPrefixEvaluated; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean supportsExecute() { |
|
|
|
public boolean supportsExecute() { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -85,15 +82,12 @@ class FS_Win32 extends FS { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public File gitPrefix() { |
|
|
|
protected File discoverGitPrefix() { |
|
|
|
if (gitPrefixEvaluated) |
|
|
|
|
|
|
|
return gitPrefix; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String path = SystemReader.getInstance().getenv("PATH"); |
|
|
|
String path = SystemReader.getInstance().getenv("PATH"); |
|
|
|
File gitExe = searchPath(path, "git.exe", "git.cmd"); |
|
|
|
File gitExe = searchPath(path, "git.exe", "git.cmd"); |
|
|
|
if (gitExe != null) |
|
|
|
if (gitExe != null) |
|
|
|
gitPrefix = gitExe.getParentFile().getParentFile(); |
|
|
|
return gitExe.getParentFile().getParentFile(); |
|
|
|
else { |
|
|
|
|
|
|
|
// This isn't likely to work, if bash is in $PATH, git should
|
|
|
|
// This isn't likely to work, if bash is in $PATH, git should
|
|
|
|
// also be in $PATH. But its worth trying.
|
|
|
|
// also be in $PATH. But its worth trying.
|
|
|
|
//
|
|
|
|
//
|
|
|
@ -101,11 +95,8 @@ class FS_Win32 extends FS { |
|
|
|
new String[] { "bash", "--login", "-c", "which git" }, //
|
|
|
|
new String[] { "bash", "--login", "-c", "which git" }, //
|
|
|
|
Charset.defaultCharset().name()); |
|
|
|
Charset.defaultCharset().name()); |
|
|
|
if (w != null) |
|
|
|
if (w != null) |
|
|
|
gitPrefix = new File(w).getParentFile().getParentFile(); |
|
|
|
return new File(w).getParentFile().getParentFile(); |
|
|
|
} |
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
gitPrefixEvaluated = true; |
|
|
|
|
|
|
|
return gitPrefix; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|