mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-29 18:52:13 +01:00
Letting postInstallScript fails gracefully
This commit is contained in:
parent
f1fc0797e1
commit
99fa19c36c
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user