mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Letting postInstallScript fails gracefully
This commit is contained in:
@ -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<String> remove(ContributedPlatform platform) {
|
||||
|
Reference in New Issue
Block a user