From 402bfc7643b58e18129cadf9b74174a1225422db Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Mon, 10 Jun 2019 09:45:24 +0200 Subject: [PATCH] [Music] Check return value of call to git-annex-find --- site-lisp/db-music.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/site-lisp/db-music.el b/site-lisp/db-music.el index d0183e7..916f463 100644 --- a/site-lisp/db-music.el +++ b/site-lisp/db-music.el @@ -45,15 +45,17 @@ Generates playlist that is comprised of exactly those files that are match it. Assumes `emms-source-file-default-directory’ to be part of a git-annex repository, and will complain otherwise." (interactive "smatch expression: ") - ;; XXX check for git-annex (let* ((default-directory emms-source-file-default-directory)) (db/-emms-playlist-from-files (->> (split-string (with-output-to-string (with-current-buffer standard-output - (apply #'call-process - "git" nil t nil - "annex" "find" - (split-string match-expression)))) + (let ((return-value (apply #'call-process + "git" nil t nil + "annex" "find" + (split-string match-expression)))) + (unless (zerop return-value) + (error "Call to `git-annex-find’ failed: %s" + (buffer-string)))))) "\n") (cl-remove-if-not #'(lambda (path) (and (not (string-empty-p path))