mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 10:51:15 -03:00
Check that /proc/version is readable before reading it in web_config.
/proc/version may be unreadable in Android.
This commit is contained in:
committed by
Fabian Homborg
parent
f8ead077bf
commit
2810ba0014
@@ -43,7 +43,7 @@ def isMacOS10_12_5_OrLater():
|
||||
|
||||
def is_wsl():
|
||||
""" Return whether we are running under the Windows Subsystem for Linux """
|
||||
if "linux" in platform.system().lower():
|
||||
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():
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user