Skip to content

Commit

Permalink
fixed-critical
Browse files Browse the repository at this point in the history
  • Loading branch information
omgupta-iitk committed Jul 5, 2024
1 parent 363521a commit 076af7e
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 076af7e

Please sign in to comment.