Skip to content

Commit

Permalink
[MNG-7578] Fallback on Linux executable in Windows for findTool utili…
Browse files Browse the repository at this point in the history
…ty (#861)

Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
  • Loading branch information
2 people authored and michael-o committed Dec 18, 2022
1 parent 15619b5 commit a020540
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,24 @@ public String findTool( String toolName )

private static File findTool( String toolName, File installDir )
{
File bin = new File( installDir, "bin" ); //NOI18N
File bin = new File( installDir, "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;
}
}
return null;
}
}
}

0 comments on commit a020540

Please sign in to comment.