Skip to content

Commit

Permalink
Merge pull request #769 from omgupta-iitk/omgupta-iitk/fixed-critical
Browse files Browse the repository at this point in the history
fixed Android Mode 4.6 Installation Issue
  • Loading branch information
codeanticode authored Jul 9, 2024
2 parents 363521a + 076af7e commit a6b5c92
Showing 1 changed file with 13 additions and 4 deletions.
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

0 comments on commit a6b5c92

Please sign in to comment.