diff --git a/onlinejudge_command/utils.py b/onlinejudge_command/utils.py index 28019b40..4f404011 100644 --- a/onlinejudge_command/utils.py +++ b/onlinejudge_command/utils.py @@ -173,7 +173,7 @@ def remove_suffix(s: str, suffix: str) -> str: def is_windows_subsystem_for_linux() -> bool: - return platform.uname().system == 'Linux' and 'Microsoft' in platform.uname().release + return platform.uname().system == 'Linux' and 'microsoft' in platform.uname().release.lower() @functools.lru_cache(maxsize=None) @@ -193,7 +193,7 @@ def webbrowser_register_explorer_exe() -> None: if sys.version_info < (3, 7): webbrowser.register('explorer', None, instance) # TODO: remove this after Python 3.6 supprot is finished else: - webbrowser.register('explorer', None, instance, preferred=True) # `preferred=True` is used to solve the issue that terminal is cleared; However, some people said the issue remains even with this fix. HELP! https://github.com/online-judge-tools/oj/issues/879 + webbrowser.register('explorer', None, instance, preferred=True) # `preferred=True` solves the issue that terminal logs are cleared on cmd.exe with stopping using wslview via www-browser. TODO: remove `preferred=True` after https://github.com/wslutilities/wslu/issues/199 is fixed. def get_default_command() -> str: