mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 01:51:14 -03:00
fix is_wsl() on wsl2
on wsl2 the /proc/version contains no Microsoft as wsl1 do.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user