1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-19 09:42:11 +03:00

CollectStdOutExecutor and CollectStdOutStdErrExecutor were plain wrong, were losing data and were blocking compilation. Fixes #3124 and #3115

This commit is contained in:
Federico Fissore
2015-05-25 16:32:33 +02:00
parent 5faa1c9866
commit 8a1e6c8a9b
8 changed files with 105 additions and 135 deletions

View File

@ -23,11 +23,12 @@
package processing.app.linux;
import org.apache.commons.exec.CommandLine;
import org.apache.commons.exec.DefaultExecutor;
import org.apache.commons.exec.Executor;
import org.apache.commons.exec.PumpStreamHandler;
import processing.app.PreferencesData;
import processing.app.debug.TargetPackage;
import processing.app.legacy.PConstants;
import processing.app.tools.CollectStdOutExecutor;
import java.io.ByteArrayOutputStream;
import java.io.File;
@ -124,7 +125,8 @@ public class Platform extends processing.app.Platform {
public Map<String, Object> resolveDeviceAttachedTo(String serial, Map<String, TargetPackage> packages, String devicesListOutput) {
assert packages != null;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Executor executor = new CollectStdOutExecutor(baos);
Executor executor = new DefaultExecutor();
executor.setStreamHandler(new PumpStreamHandler(baos, null));
try {
CommandLine toDevicePath = CommandLine.parse("udevadm info -q path -n " + serial);