Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions processing/mode/src/processing/mode/android/AndroidSDK.java
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,19 @@ static public File getGoogleDriverFolder() {
*/
private static File findCliTool(final File toolDir, String toolName)
throws BadSDKException {
File toolFile = Platform.isWindows() ? new File(toolDir, toolName + ".exe") : new File(toolDir, toolName);
if (!toolFile.exists()) {
throw new BadSDKException("Cannot find " + toolName + " in " + toolDir);
}
File toolFile;
if (Platform.isWindows()) {
toolFile = new File(toolDir, toolName + ".exe");
if (!toolFile.exists()) {
toolFile = new File(toolDir, toolName + ".bat");
}
} else {
toolFile = new File(toolDir, toolName);
}

if (!toolFile.exists()) {
throw new BadSDKException("Cannot find " + toolName + " in " + toolDir);
}

if (!Platform.isWindows()) {
try {
Expand Down