Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions phpstan.el
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ it returns the value of `SOURCE' as it is."
(defun phpstan-get-executable ()
"Return PHPStan excutable file and arguments."
(cond
((file-exists-p phpstan-executable) (list phpstan-executable))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to fix this fix as follows.

diff --git a/phpstan.el b/phpstan.el
index 5c9e9d9..e332012 100644
--- a/phpstan.el
+++ b/phpstan.el
@@ -218,7 +218,6 @@ it returns the value of `SOURCE' as it is."
 (defun phpstan-get-executable ()
   "Return PHPStan excutable file and arguments."
   (cond
-   ((file-exists-p phpstan-executable) (list phpstan-executable))
    ((eq 'docker phpstan-executable)
     (list "run" "--rm" "-v"
           (concat (expand-file-name (php-project-get-root-dir)) ":/app")
@@ -226,6 +225,8 @@ it returns the value of `SOURCE' as it is."
    ((and (consp phpstan-executable)
          (eq 'root (car phpstan-executable)))
     (expand-file-name (cdr phpstan-executable) (php-project-get-root-dir)))
+   ((and (stringp phpstan-executable) (file-exists-p phpstan-executable))
+    (list phpstan-executable))
    ((and phpstan-flycheck-auto-set-executable
          (listp phpstan-executable)
          (stringp (car phpstan-executable))

Do not worry about this as you commit as your contribution after merging.

((eq 'docker phpstan-executable)
(list "run" "--rm" "-v"
(concat (expand-file-name (php-project-get-root-dir)) ":/app")
Expand Down