mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[cli] Apply strtobool to NO_WINE env var
This commit is contained in:
parent
e4e4a0b7df
commit
3d03d1a15d
|
@ -10,6 +10,7 @@ import subprocess
|
||||||
import time
|
import time
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
|
from distutils.util import strtobool
|
||||||
from logging.handlers import QueueListener
|
from logging.handlers import QueueListener
|
||||||
from multiprocessing import freeze_support, Queue as MPQueue
|
from multiprocessing import freeze_support, Queue as MPQueue
|
||||||
from sys import exit, stdout
|
from sys import exit, stdout
|
||||||
|
@ -849,8 +850,8 @@ def main():
|
||||||
launch_parser.add_argument('--wine-prefix', dest='wine_pfx', action='store', metavar='<wine pfx path>',
|
launch_parser.add_argument('--wine-prefix', dest='wine_pfx', action='store', metavar='<wine pfx path>',
|
||||||
default=os.environ.get('LGDRY_WINE_PREFIX', None),
|
default=os.environ.get('LGDRY_WINE_PREFIX', None),
|
||||||
help='Override WINE prefix used.')
|
help='Override WINE prefix used.')
|
||||||
launch_parser.add_argument('--no-wine', dest='no_wine', action='store_true',
|
launch_parser.add_argument('--no-wine', dest='no_wine', action='store_true', type=bool,
|
||||||
default=os.environ.get('LGDRY_NO_WINE', None),
|
default=strtobool(os.environ.get('LGDRY_NO_WINE', 'False')),
|
||||||
help='Do not use WINE (e.g. if a wrapper is being used)')
|
help='Do not use WINE (e.g. if a wrapper is being used)')
|
||||||
else:
|
else:
|
||||||
# hidden arguments to not break this on Windows
|
# hidden arguments to not break this on Windows
|
||||||
|
|
Loading…
Reference in a new issue