Fix #524: Init zapped the previous work contents (#530)

Also add more comments to the zap function.
This commit is contained in:
Oliver Smith 2017-09-07 19:58:19 +00:00 committed by GitHub
parent 41d6a002dd
commit f7fa7ae1a9
2 changed files with 20 additions and 4 deletions

View file

@ -129,6 +129,8 @@ def init(args):
# Save config
pmb.config.save(args, cfg)
# Zap existing chroots
setattr(args, "work", cfg["pmbootstrap"]["work"])
if (device_exists and
len(glob.glob(args.work + "/chroot_*")) and
pmb.helpers.cli.confirm(args, "Zap existing chroots to apply configuration?", default=True)):