[cli] Rename "yes" -> "skip_prereqs" in _handle_postinstall

The name "yes" was a little confusing, you'd think it means
"Yes, install all prerequisites" while it actually skips them
This commit is contained in:
Mathis Dröge 2022-06-30 10:38:37 +02:00 committed by Rodney
parent a73d0694f6
commit d8af06c936

View file

@ -1029,7 +1029,7 @@ class LegendaryCLI:
postinstall = self.core.install_game(igame)
if postinstall:
self._handle_postinstall(postinstall, igame, yes=args.yes)
self._handle_postinstall(postinstall, igame, skip_prereqs=args.yes)
dlcs = self.core.get_dlc_for_game(game.app_name)
if dlcs and not args.skip_dlcs:
@ -1083,13 +1083,13 @@ class LegendaryCLI:
logger.info(f'Finished installation process in {end_t - start_t:.02f} seconds.')
def _handle_postinstall(self, postinstall, igame, yes=False):
def _handle_postinstall(self, postinstall, igame, skip_prereqs=False):
print('\nThis game lists the following prequisites to be installed:')
print(f'- {postinstall["name"]}: {" ".join((postinstall["path"], postinstall["args"]))}')
print('')
if os.name == 'nt':
if yes:
if skip_prereqs:
c = 'n' # we don't want to launch anything, just silent install.
else:
choice = input('Do you wish to install the prerequisites? ([y]es, [n]o, [i]gnore): ')