[cli] Properly remove EOS overlay when no prefix is supplied (#441)

This commit is contained in:
Mathis Dröge 2022-06-27 08:32:23 +02:00 committed by GitHub
parent 7a617d35f3
commit f9a2dae282
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2219,20 +2219,19 @@ class LegendaryCLI:
print('Aborting...') print('Aborting...')
return return
logger.info('Deleting overlay installation...')
self.core.remove_overlay_install()
if os.name != 'nt' and not prefix: if os.name != 'nt' and not prefix:
logger.info('Registry entries in prefixes (if any) have not been removed. ' 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.') 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...') if os.name != 'nt':
remove_registry_entries(prefix) 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.')
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()
logger.info('Done.') logger.info('Done.')
elif args.action in {'install', 'update'}: elif args.action in {'install', 'update'}: