mirror of https://github.com/apache/maven.git
[MNG-7578] Fallback on Linux executable in Windows for findTool utility (#861)
* [MVN-7578] Fallback on Linux executable in Windows for findTool utility * Fix code style Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
This commit is contained in:
parent
f27b975ddc
commit
55431cd267
|
@ -63,7 +63,14 @@ class JavaToolchainImpl extends DefaultToolchain implements JavaToolchain {
|
|||
private static File findTool(String toolName, File installFolder) {
|
||||
File bin = new File(installFolder, "bin"); // NOI18N
|
||||
if (bin.exists()) {
|
||||
File tool = new File(bin, toolName + (Os.isFamily("windows") ? ".exe" : "")); // NOI18N
|
||||
boolean isWindows = Os.isFamily("windows"); // NOI18N
|
||||
if (isWindows) {
|
||||
File tool = new File(bin, toolName + ".exe");
|
||||
if (tool.exists()) {
|
||||
return tool;
|
||||
}
|
||||
}
|
||||
File tool = new File(bin, toolName);
|
||||
if (tool.exists()) {
|
||||
return tool;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue