mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 14:31:43 +08:00
Fix launching fish_config on SailfishOS
This commit is contained in:
parent
0bc6a7b2ed
commit
5994e44877
|
@ -81,6 +81,16 @@ def is_wsl():
|
|||
return False
|
||||
|
||||
|
||||
def is_sailfish_os():
|
||||
""" Return whether we are running on Sailfish OS """
|
||||
if "linux" in platform.system().lower() and os.access("/etc/sailfish-release", os.R_OK):
|
||||
with open("/etc/sailfish-release", "r") as f:
|
||||
# Find 'ID=sailfishos'
|
||||
if "sailfishos" in f.read():
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def is_termux():
|
||||
""" Return whether we are running under the Termux application for Android"""
|
||||
return "com.termux" in os.environ["PATH"] and find_executable("termux-open-url")
|
||||
|
@ -1637,7 +1647,7 @@ def runThing():
|
|||
sys.exit(-1)
|
||||
elif is_termux():
|
||||
subprocess.call(["termux-open-url", url])
|
||||
elif is_chromeos_garcon():
|
||||
elif is_chromeos_garcon() or is_sailfish_os():
|
||||
webbrowser.open(url)
|
||||
else:
|
||||
webbrowser.open(fileurl)
|
||||
|
|
Loading…
Reference in New Issue
Block a user