Fallback to finding executables in PATH for Linux runner (Closes #2019)

This commit is contained in:
Mathieu Comandon 2019-11-03 16:38:09 -08:00
parent 0318557c83
commit 42d50dcac3

View file

@ -63,12 +63,13 @@ class linux(Runner):
def game_exe(self):
"""Return the game's executable's path."""
exe = self.game_config.get("exe")
if exe:
if os.path.isabs(exe):
exe_path = exe
else:
exe_path = os.path.join(self.game_path, exe)
return exe_path
if not exe:
return
if os.path.isabs(exe):
return exe
if self.game_path:
return os.path.join(self.game_path, exe)
return system.find_executable(exe)
def get_relative_exe(self):
"""Return a relative path if a working dir is set in the options