@NotNull
  public GeneralCommandLine createGeneralCommandLine(@NotNull TargetedCommandLine commandLine) throws CantRunException {
    try {
      PtyOptions ptyOption = commandLine.getPtyOptions();
      LocalPtyOptions localPtyOptions = ptyOption != null ? LocalTargets.toLocalPtyOptions(ptyOption) : null;
      GeneralCommandLine generalCommandLine;
      if (localPtyOptions != null) {
        PtyCommandLine ptyCommandLine = new PtyCommandLine(commandLine.collectCommandsSynchronously());
        ptyCommandLine.withOptions(localPtyOptions);
        generalCommandLine = ptyCommandLine;
      }
      else {
        generalCommandLine = new GeneralCommandLine(commandLine.collectCommandsSynchronously());
      }
      generalCommandLine.withParentEnvironmentType(getRequest().getParentEnvironmentType());
      String inputFilePath = commandLine.getInputFilePath();
      if (inputFilePath != null) {
        generalCommandLine.withInput(new File(inputFilePath));
      }
      generalCommandLine.withCharset(commandLine.getCharset());
      String workingDirectory = commandLine.getWorkingDirectory();
      if (workingDirectory != null) {
        generalCommandLine.withWorkDirectory(workingDirectory);
      }
      generalCommandLine.withEnvironment(commandLine.getEnvironmentVariables());
      generalCommandLine.setRedirectErrorStream(commandLine.isRedirectErrorStream());
      return generalCommandLine;
    }
    catch (ExecutionException e) {
      throw new CantRunException(e.getMessage(), e);
    }
  }
@NotNull
  public GeneralCommandLine createGeneralCommandLine(@NotNull TargetedCommandLine commandLine)