From f9a2dae282407afcbddd82f613fa9e3d2088ba0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathis=20Dr=C3=B6ge?= <34034631+CommandMC@users.noreply.github.com> Date: Mon, 27 Jun 2022 08:32:23 +0200 Subject: [PATCH] [cli] Properly remove EOS overlay when no prefix is supplied (#441) --- legendary/cli.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/legendary/cli.py b/legendary/cli.py index 52398a5..ad796a1 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -2219,20 +2219,19 @@ class LegendaryCLI: print('Aborting...') return + logger.info('Deleting overlay installation...') + self.core.remove_overlay_install() + if os.name != 'nt' and not prefix: logger.info('Registry entries in prefixes (if any) have not been removed. ' f'This shouldn\'t cause any issues as the overlay will simply fail to load.') - return + else: + logger.info('Removing registry entries...') + remove_registry_entries(prefix) - logger.info('Removing registry entries...') - remove_registry_entries(prefix) - - if os.name != 'nt': - logger.info(f'Registry entries in prefixes other than "{prefix}" were not removed. ' - f'This shouldn\'t cause any issues as the overlay will simply fail to load.') - - logger.info('Deleting overlay installation...') - self.core.remove_overlay_install() + if os.name != 'nt': + logger.info(f'Registry entries in prefixes other than "{prefix}" were not removed. ' + f'This shouldn\'t cause any issues as the overlay will simply fail to load.') logger.info('Done.') elif args.action in {'install', 'update'}: