From 3d03d1a15d77c0eca3e1e86c0d2ee04b5484023b Mon Sep 17 00:00:00 2001 From: derrod Date: Sat, 23 May 2020 19:01:30 +0200 Subject: [PATCH] [cli] Apply strtobool to NO_WINE env var --- legendary/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/legendary/cli.py b/legendary/cli.py index 55333fe..1cd6904 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -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='', 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