def METHOD_NAME(cls, location: str) -> str:
    url = cls.run_command(
        ["showconfig", "paths.default"],
        show_stdout=False,
        stdout_only=True,
        cwd=location,
    ).strip()
    if cls._is_local_repository(url):
        url = path_to_url(url)
    return url.strip()