From f32777a0ccee7a72c97085ed778714fabdef5e3a Mon Sep 17 00:00:00 2001 From: Cherichy Date: Mon, 25 May 2020 00:14:36 +0000 Subject: [PATCH] check for both wsl1 and wsl2 --- share/tools/web_config/webconfig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index fcb16513c..5ecfa3117 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -47,7 +47,8 @@ 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(): + # Find 'Microsoft' for wsl1 and 'microsoft' for wsl2 + if "microsoft" in f.read().lower(): return True return False