From 4ef35c5527e3ba4da27090f5b040786e0e47214d Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Tue, 11 May 2021 20:11:26 -0400 Subject: [PATCH] Improved how we deal with requirements.txt installation process results. --- bazarr/init.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/bazarr/init.py b/bazarr/init.py index 8f390c651..acdba946d 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -56,10 +56,17 @@ if not args.no_update: logging.info('BAZARR unable to install requirements (user without home directory).') else: logging.info('BAZARR installing requirements...') - subprocess.call([sys.executable, '-m', 'pip', 'install', '--user', '-r', - os.path.join(os.path.dirname(__file__), '..', 'requirements.txt')], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - logging.info('BAZARR requirements installed.') + try: + subprocess.check_output([sys.executable, '-m', 'pip', 'install', '--user', '-qq', + '--disable-pip-version-check', '--no-color', '-r', + os.path.join(os.path.dirname(__file__), '..', 'requirements.txt')], + stderr=subprocess.STDOUT) + except subprocess.CalledProcessError as e: + logging.exception('BAZARR requirements.txt installation result: {}'.format(e.stdout)) + os._exit(1) + else: + logging.info('BAZARR requirements installed.') + try: restart_file = io.open(os.path.join(args.config_dir, "bazarr.restart"), "w", encoding='UTF-8') except Exception as e: