From b34d9bcc97cc1c4d194ec0e5d784b288cfe91683 Mon Sep 17 00:00:00 2001 From: Cherichy Date: Thu, 21 May 2020 17:45:45 +0800 Subject: [PATCH] fix is_wsl() on wsl2 on wsl2 the /proc/version contains no Microsoft as wsl1 do. --- share/tools/web_config/webconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index 1c9e5cab8..fcb16513c 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -47,7 +47,7 @@ def is_wsl(): """ Return whether we are running under the Windows Subsystem for Linux """ if "linux" in platform.system().lower() and os.access("/proc/version", os.R_OK): with open("/proc/version", "r") as f: - if "Microsoft" in f.read(): + if "microsoft" in f.read(): return True return False