private static @Nullable Pair<GeneralCommandLine, List<String>> doFetchDistributionsFromWslCli() throws IOException {
    Path wslExe = WSLDistribution.findWslExe();
    if (wslExe == null) {
      LOG.info("Cannot parse WSL distributions: wsl.exe is not found in %PATH%");
      return null;
    }

    GeneralCommandLine commandLine = new GeneralCommandLine(wslExe.toString(), "--list", "--quiet").withCharset(StandardCharsets.UTF_16LE);

    ProcessOutput output;
    try {
      output = ExecUtil.execAndGetOutput(commandLine, WSLDistribution.DEFAULT_TIMEOUT);
    }
    catch (ExecutionException e) {
      throw new IOException("Failed to run " + commandLine.getCommandLineString(), e);
    }
    if (output.isTimeout() || output.getExitCode() != 0 || !output.getStderr().isEmpty()) {
      throw new IOException("Failed to run " + commandLine.getCommandLineString() + ": " + output);
    }
    List<@NlsSafe String> msIds = ContainerUtil.filter(output.getStdoutLines(true), distribution -> {
      return !INTERNAL_DISTRIBUTIONS.contains(distribution);
    });
    return Pair.create(commandLine, msIds);
  }
private static @Nullable Pair<GeneralCommandLine, List<String>> doFetchDistributionsFromWslCli()