mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[cli] Make pre-installation check results stand out more
This commit is contained in:
parent
db1a6706e4
commit
e11dd8734f
|
@ -854,27 +854,29 @@ class LegendaryCLI:
|
||||||
f'(Compression savings: {compression:.01f}%)')
|
f'(Compression savings: {compression:.01f}%)')
|
||||||
logger.info(f'Reusable size: {analysis.reuse_size / 1024 / 1024:.02f} MiB (chunks) / '
|
logger.info(f'Reusable size: {analysis.reuse_size / 1024 / 1024:.02f} MiB (chunks) / '
|
||||||
f'{analysis.unchanged / 1024 / 1024:.02f} MiB (unchanged / skipped)')
|
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,
|
res = self.core.check_installation_conditions(analysis=analysis, install=igame, game=game,
|
||||||
updating=self.core.is_installed(args.app_name),
|
updating=self.core.is_installed(args.app_name),
|
||||||
ignore_space_req=args.ignore_space)
|
ignore_space_req=args.ignore_space)
|
||||||
|
|
||||||
if res.warnings or res.failures:
|
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:
|
if res.warnings:
|
||||||
for warn in sorted(res.warnings):
|
for warn in sorted(res.warnings):
|
||||||
logger.warning(warn)
|
print(' - Warning:', warn)
|
||||||
|
if not res.failures:
|
||||||
|
print()
|
||||||
|
|
||||||
if res.failures:
|
if res.failures:
|
||||||
for msg in sorted(res.failures):
|
for msg in sorted(res.failures):
|
||||||
logger.fatal(msg)
|
print(' ! Failure:', msg)
|
||||||
logger.error('Installation cannot proceed, exiting.')
|
print()
|
||||||
|
logger.fatal('Installation cannot proceed, exiting.')
|
||||||
exit(1)
|
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 args.yes:
|
||||||
if not get_boolean_choice(f'Do you wish to install "{igame.title}"?'):
|
if not get_boolean_choice(f'Do you wish to install "{igame.title}"?'):
|
||||||
print('Aborting...')
|
print('Aborting...')
|
||||||
|
|
Loading…
Reference in a new issue