diff --git a/check50/__main__.py b/check50/__main__.py index 57fc756..b4d6c2c 100644 --- a/check50/__main__.py +++ b/check50/__main__.py @@ -8,6 +8,7 @@ from json import JSONDecodeError import logging import os +import platform import site from pathlib import Path import shutil @@ -406,7 +407,13 @@ def main(): html = renderer.to_html(**results) with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".html") as html_file: html_file.write(html) - url = f"file://{html_file.name}" + + if "microsoft-standard" in platform.uname().release: + stream = os.popen(f"wslpath -m {html_file.name}") + wsl_path = stream.read().strip() + url = f"file://{wsl_path}" + else: + url = f"file://{html_file.name}" else: url = f"https://submit.cs50.io/check50/{tag_hash}" diff --git a/setup.py b/setup.py index be7eb33..5c05fb8 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,6 @@ "console_scripts": ["check50=check50.__main__:main"] }, url="https://github.com/cs50/check50", - version="3.3.6", + version="3.3.7", include_package_data=True )