Add questions when installing everything

This commit is contained in:
flyingscorpio@pinebook-pro 2020-04-24 10:11:31 +02:00
parent 2cfd39dbde
commit 51927219ef

View file

@ -261,9 +261,17 @@ class Installer:
"""
if not programs:
ui.info("No programs were specified.",
"Fetching from the configuration file.")
programs = sorted(self.conf.keys())
for program in programs:
self.install_program(program)
for program in programs:
if ui.ask_yes_no("Do you wish to install {}?".format(program)):
self.install_program(program)
else:
ui.info_2("Skipping {}".format(program))
else:
for program in programs:
self.install_program(program)
def install_program(self, program: str) -> None:
"""Install one program (called by self.install()).