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); }
@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); } }