Commit deb9ebc6 authored by Paul Eggert's avatar Paul Eggert

(vc-find-binary): Fix bug; it always claimed success.

parent 2cc27dd3
......@@ -164,16 +164,19 @@ is sensitive to blank lines.")
(defun vc-find-binary (name)
"Look for a command anywhere on the subprocess-command search path."
(or (cdr (assoc name vc-binary-assoc))
(let ((full nil))
(catch 'found
(function (lambda (s)
(if (and s (file-exists-p (setq full (concat s "/" name))))
(throw 'found nil))))
(if full
(setq vc-binary-assoc (cons (cons name full) vc-binary-assoc)))
(catch 'found
(lambda (s)
(if s
(let ((full (concat s "/" name)))
(if (file-executable-p full)
(setq vc-binary-assoc
(cons (cons name full) vc-binary-assoc))
(throw 'found full)))))))
(defun vc-do-command (okstatus command file &rest flags)
"Execute a version-control command, notifying user and checking for errors.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment