Check more paths for lutris-wrapper script

Fixes #2681
This commit is contained in:
Wouter Wijsman 2020-03-24 18:02:51 +01:00 committed by Mathieu Comandon
parent 6ac4810412
commit 85f1976e3a

View file

@ -17,6 +17,15 @@ from lutris.util.log import logger
from lutris.util import system
WRAPPER_SCRIPT = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), "../share/lutris/bin/lutris-wrapper"))
if not os.path.isfile(WRAPPER_SCRIPT):
usr_path = "/usr/share/lutris/bin/lutris-wrapper"
usr_local_path = "/usr/local/share/lutris/bin/lutris-wrapper"
if os.path.isfile(usr_path):
WRAPPER_SCRIPT = usr_path
elif os.path.isfile(usr_local_path):
WRAPPER_SCRIPT = usr_local_path
else:
raise FileNotFoundError("Couldn't find lutris-wrapper script in any of the expected locations")
class MonitoredCommand: