[cli] Log prefix used / error if it doesn't exist

This commit is contained in:
derrod 2021-12-31 18:56:52 +01:00
parent 8a9ca14391
commit 6a408e8404

View file

@ -1982,6 +1982,12 @@ class LegendaryCLI:
logger.error('Need either config default, --prefix, --bottle, or --app to install the overlay to.') logger.error('Need either config default, --prefix, --bottle, or --app to install the overlay to.')
return return
if not os.path.exists(prefix):
logger.error(f'Prefix "{prefix}" does not exist.')
return
else:
logger.info(f'Using prefix "{prefix}"')
if args.action == 'info': if args.action == 'info':
reg_paths = query_registry_entries(prefix) reg_paths = query_registry_entries(prefix)
available_installs = self.core.search_overlay_installs(prefix) available_installs = self.core.search_overlay_installs(prefix)