コード例 #1
0
  protected boolean handlePrompt(String text, Key outputType) {
    // if process has separate output and error streams => try to handle prompts only from error
    // stream output
    boolean shouldHandleWithListeners =
        !processHasSeparateErrorStream() || ProcessOutputTypes.STDERR.equals(outputType);

    return shouldHandleWithListeners && handlePromptWithListeners(text, outputType);
  }
コード例 #2
0
 @NotNull
 private StringBuilder getLastLineFor(Key outputType) {
   if (ProcessOutputTypes.STDERR.equals(outputType)) {
     return errorLine;
   } else if (ProcessOutputTypes.STDOUT.equals(outputType)) {
     return outputLine;
   } else {
     throw new IllegalArgumentException("Unknown process output type " + outputType);
   }
 }