File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/main/java/com/bazel_diff Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -102,9 +102,10 @@ private List<Build.Target> performBazelQuery(String query) throws IOException {
102102 cmd .add (tempFile .toString ());
103103
104104 ProcessBuilder pb = new ProcessBuilder (cmd ).directory (workingDirectory .toFile ());
105+ pb .redirectError (ProcessBuilder .Redirect .INHERIT );
105106 Process process = pb .start ();
106107 ArrayList <Build .Target > targets = new ArrayList <>();
107-
108+
108109 // Prevent process hang in the case where bazel writes to stderr.
109110 // See https://stackoverflow.com/questions/3285408/java-processbuilder-resultant-process-hangs
110111 BufferedReader stdError = new BufferedReader (new InputStreamReader (process .getErrorStream ()));
@@ -125,14 +126,14 @@ public void run() {
125126 }
126127 });
127128 tStdError .start ();
128-
129+
129130 while (true ) {
130131 Build .Target target = Build .Target .parseDelimitedFrom (process .getInputStream ());
131132 if (target == null ) break ; // EOF
132133 targets .add (target );
133134 }
134-
135- tStdError .interrupt ();
135+
136+ tStdError .interrupt ();
136137
137138 Files .delete (tempFile );
138139
You can’t perform that action at this time.
0 commit comments