Skip to content

Commit a6b5c92

Browse files
authored
Merge pull request #769 from omgupta-iitk/omgupta-iitk/fixed-critical
fixed Android Mode 4.6 Installation Issue
2 parents 363521a + 076af7e commit a6b5c92

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

processing/mode/src/processing/mode/android/AndroidSDK.java

+13-4
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,19 @@ static public File getGoogleDriverFolder() {
405405
*/
406406
private static File findCliTool(final File toolDir, String toolName)
407407
throws BadSDKException {
408-
File toolFile = Platform.isWindows() ? new File(toolDir, toolName + ".exe") : new File(toolDir, toolName);
409-
if (!toolFile.exists()) {
410-
throw new BadSDKException("Cannot find " + toolName + " in " + toolDir);
411-
}
408+
File toolFile;
409+
if (Platform.isWindows()) {
410+
toolFile = new File(toolDir, toolName + ".exe");
411+
if (!toolFile.exists()) {
412+
toolFile = new File(toolDir, toolName + ".bat");
413+
}
414+
} else {
415+
toolFile = new File(toolDir, toolName);
416+
}
417+
418+
if (!toolFile.exists()) {
419+
throw new BadSDKException("Cannot find " + toolName + " in " + toolDir);
420+
}
412421

413422
if (!Platform.isWindows()) {
414423
try {

0 commit comments

Comments
 (0)