Function: dape--config-ensure
dape--config-ensure is a natively compiled function defined in
dape.el.
Signature
(dape--config-ensure CONFIG &optional SIGNAL)
Documentation
Ensure that CONFIG is executable.
If SIGNAL is non-nil raises user-error on failure otherwise returns
nil.
Source Code
;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape--config-ensure (config &optional signal)
"Ensure that CONFIG is executable.
If SIGNAL is non-nil raises `user-error' on failure otherwise returns
nil."
(if-let* ((ensure-fn (plist-get config 'ensure)))
(condition-case err
(let ((default-directory (or (dape-config-get config 'command-cwd)
default-directory)))
(or (funcall ensure-fn config) t))
(error
(if signal (user-error (error-message-string err)) nil)))
t))