@NotNull
  private GeneralCommandLine createCommandLineForFile() throws ExecutionException {
    VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByPath(myRunConfiguration.getScriptPath());
    if (virtualFile == null || virtualFile.getParent() == null) {
      throw new ExecutionException(ShBundle.message("error.message.cannot.determine.shell.script.parent.directory"));
    }

    final WSLDistribution wslDistribution = ShRunConfiguration.getWSLDistributionIfNeeded(myRunConfiguration.getInterpreterPath(),
                                                                                          myRunConfiguration.getScriptPath());

    PtyCommandLine commandLine = new PtyCommandLine();
    if (!SystemInfo.isWindows || wslDistribution != null) {
      commandLine.getEnvironment().put("TERM", "xterm-256color"); //NON-NLS
    }
    commandLine.withConsoleMode(false);
    commandLine.withInitialColumns(120);
    commandLine.withEnvironment(myRunConfiguration.getEnvData().getEnvs());
    commandLine.withParentEnvironmentType(GeneralCommandLine.ParentEnvironmentType.CONSOLE);
    commandLine.setWorkDirectory(myRunConfiguration.getScriptWorkingDirectory());

    commandLine.setExePath(convertToWslIfNeeded(myRunConfiguration.getInterpreterPath(), wslDistribution));
    if (StringUtil.isNotEmpty(myRunConfiguration.getInterpreterOptions())) {
      commandLine.addParameters(ParametersListUtil.parse(myRunConfiguration.getInterpreterOptions()));
    }
    commandLine.addParameter(convertToWslIfNeeded(myRunConfiguration.getScriptPath(), wslDistribution));
    if (StringUtil.isNotEmpty(myRunConfiguration.getScriptOptions())) {
      commandLine.addParameters(ParametersListUtil.parse(myRunConfiguration.getScriptOptions()));
    }

    if (wslDistribution != null) {
      commandLine = wslDistribution.patchCommandLine(commandLine, myProject, null, false);
    }

    return commandLine;
  }
@NotNull
  private GeneralCommandLine createCommandLineForFile()