diff --git a/lutris/runners/runner.py b/lutris/runners/runner.py index 9a0a969bd..26cc772f1 100644 --- a/lutris/runners/runner.py +++ b/lutris/runners/runner.py @@ -151,7 +151,6 @@ class Runner: def get_env(self, os_env=False): env = {} - if os_env: env.update(os.environ.copy()) diff --git a/lutris/runners/wine.py b/lutris/runners/wine.py index fc173c414..4b5b2bdaa 100644 --- a/lutris/runners/wine.py +++ b/lutris/runners/wine.py @@ -1018,7 +1018,12 @@ class wine(Runner): return overrides def get_env(self, os_env=True): - env = super(wine, self).get_env(os_env) + """Return environment variables used by the game""" + # Always false to runner.get_env, the default value + # of os_env is inverted in that class. + env = super(wine, self).get_env(False) + if os_env: + env.update(os.environ.copy()) env['WINEDEBUG'] = self.runner_config.get('show_debug', '-all') env['WINEARCH'] = self.wine_arch env['WINE'] = self.get_executable()