[cli] Make pre-installation check results stand out more

This commit is contained in:
derrod 2021-12-03 17:54:39 +01:00
parent db1a6706e4
commit e11dd8734f

View file

@ -854,27 +854,29 @@ class LegendaryCLI:
f'(Compression savings: {compression:.01f}%)')
logger.info(f'Reusable size: {analysis.reuse_size / 1024 / 1024:.02f} MiB (chunks) / '
f'{analysis.unchanged / 1024 / 1024:.02f} MiB (unchanged / skipped)')
logger.info('Downloads are resumable, you can interrupt the download with '
'CTRL-C and resume it using the same command later on.')
res = self.core.check_installation_conditions(analysis=analysis, install=igame, game=game,
updating=self.core.is_installed(args.app_name),
ignore_space_req=args.ignore_space)
if res.warnings or res.failures:
logger.info('Installation requirements check returned the following results:')
print('\nInstallation requirements check returned the following results:')
if res.warnings:
for warn in sorted(res.warnings):
logger.warning(warn)
print(' - Warning:', warn)
if not res.failures:
print()
if res.failures:
for msg in sorted(res.failures):
logger.fatal(msg)
logger.error('Installation cannot proceed, exiting.')
print(' ! Failure:', msg)
print()
logger.fatal('Installation cannot proceed, exiting.')
exit(1)
logger.info('Downloads are resumable, you can interrupt the download with '
'CTRL-C and resume it using the same command later on.')
if not args.yes:
if not get_boolean_choice(f'Do you wish to install "{igame.title}"?'):
print('Aborting...')