diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py index 2a9c46172..dedf51a8b 100644 --- a/beets/ui/__init__.py +++ b/beets/ui/__init__.py @@ -716,6 +716,7 @@ def _raw_main(args, load_config=True): # Invoke the subcommand. subcommand.func(lib, suboptions, subargs) + plugins.send('cli_exit', lib=lib) def main(args=None): """Run the main command-line interface for beets. Includes top-level @@ -723,7 +724,6 @@ def main(args=None): """ try: _raw_main(args) - plugins.send('cli_exit') except UserError as exc: message = exc.args[0] if exc.args else None log.error(u'error: {0}'.format(message))