private @NotNull @NlsSafe String computeMntRoot(@Nullable ProgressIndicator pi) {
    long startNano = System.nanoTime();
    String windowsWorkingDirectory = Path.of(".").toAbsolutePath().normalize().toString();

    if (!OSAgnosticPathUtil.isAbsoluteDosPath(windowsWorkingDirectory)) {
      LOG.warn("Failed to get WSL mount root for " + getMsId() + ": DOS working directory is expected, but got " + windowsWorkingDirectory);
      return WSLDistribution.DEFAULT_WSL_MNT_ROOT;
    }

    WSLCommandLineOptions options = new WSLCommandLineOptions().setLaunchWithWslExe(true).setExecuteCommandInShell(false);
    GeneralCommandLine commandLine = new GeneralCommandLine("pwd");
    // Required to prevent recursion
    commandLine.putUserData(CALCULATING_MOUNT_ROOT_COMMAND, true);
    // Use interoperability between Windows and Linux - the Linux process inherits the Windows working directory.
    commandLine.setWorkDirectory(windowsWorkingDirectory);
    String linuxWorkingDirectory = readWslOutputLine(options, commandLine, pi);
    if (linuxWorkingDirectory == null) {
      LOG.warn("Failed to get WSL mount root for " + getMsId() + ": empty output");
      return WSLDistribution.DEFAULT_WSL_MNT_ROOT;
    }

    String linuxWorkingDirectorySuffix = WSLDistribution.convertWindowsPath(windowsWorkingDirectory);
    if (StringUtil.endsWithIgnoreCase(linuxWorkingDirectory, linuxWorkingDirectorySuffix)) {
      String mountRoot = StringUtil.trimEnd(linuxWorkingDirectory, linuxWorkingDirectorySuffix, true);
      LOG.info("WSL mount root for " + getMsId() + " is " + mountRoot + " (done in " + TimeoutUtil.getDurationMillis(startNano) + " ms)");
      return mountRoot;
    }
    LOG.warn("Failed to get WSL mount root for " + getMsId() + ": Linux working directory does not ends with Windows converted suffix. " +
             String.join("; ", List.of("Windows pwd=" + windowsWorkingDirectory,
                                       "Linux pwd=" + linuxWorkingDirectory,
                                       "expected linux suffix=" + linuxWorkingDirectorySuffix)));
    return WSLDistribution.DEFAULT_WSL_MNT_ROOT;
  }
private @NotNull @NlsSafe String computeMntRoot(@Nullable ProgressIndicator pi)