From f7394a53e05303043296beb127a82a302e189b3f Mon Sep 17 00:00:00 2001 From: Jonathan del Strother Date: Fri, 11 Nov 2016 13:38:12 +0000 Subject: [PATCH] Use executable-find to look up flow binary for eldoc Flycheck will use executable-find, so just calling 'flow type-at-pos' can result in spawning conflicting flow versions --- layers/+lang/flow-type/funcs.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layers/+lang/flow-type/funcs.el b/layers/+lang/flow-type/funcs.el index dc243aea5adcd..baed4c107ea41 100644 --- a/layers/+lang/flow-type/funcs.el +++ b/layers/+lang/flow-type/funcs.el @@ -11,7 +11,9 @@ (defun flow-type/type-at-cursor () (let ((output (flow-type/call-process-on-buffer-to-string - (format "flow type-at-pos --retry-if-init=false --json %d %d" (line-number-at-pos) (+ (current-column) 1))))) + (format "%s type-at-pos --retry-if-init=false --json %d %d" + (executable-find "flow") + (line-number-at-pos) (+ (current-column) 1))))) (unless (string-match "\w*flow is still initializing" output) (flow-type/type-description (json-read-from-string output)))))