diff --git a/arduino-core/src/cc/arduino/contributions/packages/ContributionInstaller.java b/arduino-core/src/cc/arduino/contributions/packages/ContributionInstaller.java index 8de07110b..396569726 100644 --- a/arduino-core/src/cc/arduino/contributions/packages/ContributionInstaller.java +++ b/arduino-core/src/cc/arduino/contributions/packages/ContributionInstaller.java @@ -192,10 +192,16 @@ public class ContributionInstaller { ByteArrayOutputStream stderr = new ByteArrayOutputStream(); Executor executor = new CollectStdOutStdErrExecutor(stdout, stderr); executor.setWorkingDirectory(folder); - executor.execute(new CommandLine(postInstallScript)); + executor.setExitValues(null); + int exitValue = executor.execute(new CommandLine(postInstallScript)); + executor.setExitValues(new int[0]); System.out.write(stdout.toByteArray()); System.err.write(stderr.toByteArray()); + + if (executor.isFailure(exitValue)) { + throw new IOException(); + } } public List remove(ContributedPlatform platform) {