Skip to content

Commit c2f7ff4

Browse files
author
jantje
committed
platform.txt is obligatory. test existance before changing
1 parent e445d4c commit c2f7ff4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

io.sloeber.core/src/io/sloeber/core/managers/InternalPackageManager.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,10 @@ static public IStatus downloadAndInstall(ArduinoPlatform platform, boolean force
150150

151151
// always replace -DARDUINO_BOARD="{build.board}" with
152152
// -DARDUINO_BOARD="\"{build.board}\""
153-
FileModifiers.replaceInFile(platform.getPlatformFile(), false, "-DARDUINO_BOARD=\"{build.board}\"", //$NON-NLS-1$
154-
"-DARDUINO_BOARD=\"\\\"{build.board}\\\"\""); //$NON-NLS-1$
155-
153+
if (platform.getPlatformFile().exists()) {
154+
FileModifiers.replaceInFile(platform.getPlatformFile(), false, "-DARDUINO_BOARD=\"{build.board}\"", //$NON-NLS-1$
155+
"-DARDUINO_BOARD=\"\\\"{build.board}\\\"\""); //$NON-NLS-1$
156+
}
156157
return mstatus;
157158

158159
}

0 commit comments

Comments
 (0)