[cli] Apply strtobool to NO_WINE env var

This commit is contained in:
derrod 2020-05-23 19:01:30 +02:00
parent e4e4a0b7df
commit 3d03d1a15d

View file

@ -10,6 +10,7 @@ import subprocess
import time
import webbrowser
from distutils.util import strtobool
from logging.handlers import QueueListener
from multiprocessing import freeze_support, Queue as MPQueue
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>',
default=os.environ.get('LGDRY_WINE_PREFIX', None),
help='Override WINE prefix used.')
launch_parser.add_argument('--no-wine', dest='no_wine', action='store_true',
default=os.environ.get('LGDRY_NO_WINE', None),
launch_parser.add_argument('--no-wine', dest='no_wine', action='store_true', type=bool,
default=strtobool(os.environ.get('LGDRY_NO_WINE', 'False')),
help='Do not use WINE (e.g. if a wrapper is being used)')
else:
# hidden arguments to not break this on Windows