Skip to content

Commit 807da75

Browse files
committed
Improve phpacor-executable, support path-expansion and local installed
1 parent 7ed0c9f commit 807da75

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

phpactor.el

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,12 @@
7777
;; Utility functions
7878
(defun phpactor-find-executable ()
7979
"Return Phpactor command or path to executable."
80-
(or phpactor-executable
81-
(executable-find phpactor-command-name)))
80+
(or (when phpactor-executable
81+
(php-project--eval-bootstrap-scripts phpactor-executable))
82+
(executable-find phpactor-command-name)
83+
(let ((vendor-executable (f-join (phpactor-get-working-dir) "vendor/bin/phpactor")))
84+
(when (file-exists-p vendor-executable)
85+
vendor-executable))))
8286

8387
(defun phpactor-get-working-dir ()
8488
"Return working directory of Phpactor."

0 commit comments

Comments
 (0)