diff --git a/core/core-cli.el b/core/core-cli.el index ac2f6bd6f..d866b86c3 100644 --- a/core/core-cli.el +++ b/core/core-cli.el @@ -112,18 +112,15 @@ If SHOW-HELP is non-nil, show the documentation for said dispatcher." (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-execute-hook) (unwind-protect - (condition-case e - (when-let (ret (apply fn args)) - (print! - "\n%s" - (success "Finished! (%.4fs)" - (float-time - (time-subtract (current-time) - start-time)))) - (run-hooks 'doom-cli-post-execute-hook) - ret) - ('wrong-number-of-arguments - (user-error "I don't understand 'doom %s %s'\n\nRun 'doom help' to see what I do understand." cmd (string-join args " ")))) + (when-let (ret (apply fn args)) + (print! + "\n%s" + (success "Finished! (%.4fs)" + (float-time + (time-subtract (current-time) + start-time)))) + (run-hooks 'doom-cli-post-execute-hook) + ret) (run-hooks 'doom-cli-post-error-execute-hook)))))) (defmacro defcligroup! (name docstring &rest body)