mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[cli/core] Add env var for wrapper and fix priority
Priority should always be command line > env var > config
This commit is contained in:
parent
6c9e3a1d62
commit
c52cd09eb7
|
@ -839,6 +839,7 @@ def main():
|
|||
launch_parser.add_argument('--language', dest='language', action='store', metavar='<two letter language code>',
|
||||
help='Override language for game launch (defaults to system settings)')
|
||||
launch_parser.add_argument('--wrapper', dest='wrapper', action='store', metavar='<wrapper command>',
|
||||
default=os.environ.get('LGDRY_WRAPPER', None),
|
||||
help='Wrapper command to launch game with')
|
||||
|
||||
if os.name != 'nt':
|
||||
|
|
|
@ -253,7 +253,7 @@ class LegendaryCore:
|
|||
|
||||
params = []
|
||||
|
||||
if wrapper := self.lgd.config.get(app_name, 'wrapper', fallback=wrapper):
|
||||
if wrapper or (wrapper := self.lgd.config.get(app_name, 'wrapper')):
|
||||
params.extend(shlex.split(wrapper))
|
||||
|
||||
if os.name != 'nt' and not disable_wine:
|
||||
|
|
Loading…
Reference in a new issue