Properly remove EOS overlay when no prefix is supplied

This commit is contained in:
Mathis Dröge 2022-06-27 01:11:56 +02:00
parent 7a617d35f3
commit 6ff8bfc7e3
No known key found for this signature in database
GPG key ID: 3071D4EFBB298F5F

View file

@ -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'}: