@NotNull
  protected ProcessOutput runProcessWithLineOutputListener(@NotNull String homePath,
                                                           @NotNull List<String> cmd,
                                                           @NotNull Map<String, String> env,
                                                           @Nullable String stdin,
                                                           int timeout,
                                                           @NotNull LineWiseProcessOutputListener listener)
    throws ExecutionException, InvalidSdkException {
    final GeneralCommandLine commandLine = new GeneralCommandLine(cmd)
      .withWorkDirectory(homePath)
      .withEnvironment(env);
    final CapturingProcessHandler handler = new CapturingProcessHandler(commandLine);
    if (stdin != null) {
      sendLineToProcessInput(handler, stdin);
    }
    handler.addProcessListener(new LineWiseProcessOutputListener.Adapter(listener));
    return handler.runProcess(timeout);
  }
@NotNull
  protected ProcessOutput runProcessWithLineOutputListener(@NotNull String homePath,
                                                           @NotNull List<String> cmd,
                                                           @NotNull Map<String, String> env,
                                                           @Nullable String stdin,
                                                           int timeout,
                                                           @NotNull LineWiseProcessOutputListener listener)