Skip to content

Commit

Permalink
Merge pull request #884 from online-judge-tools/fix-879-again
Browse files Browse the repository at this point in the history
Fix the issue of terminal logs again
  • Loading branch information
kmyk authored Jul 17, 2021
2 parents ce51ebc + ab8d310 commit a10592f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onlinejudge_command/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit a10592f

Please sign in to comment.