From 55e6d57b584d7106e7651642d08cd57ceab5e5f0 Mon Sep 17 00:00:00 2001 From: Naoya Yamashita Date: Tue, 8 Sep 2020 16:40:43 +0900 Subject: [PATCH] use file-executable-p instead of file-exists-p --- phpstan.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpstan.el b/phpstan.el index f121788..7fc4121 100644 --- a/phpstan.el +++ b/phpstan.el @@ -286,7 +286,7 @@ it returns the value of `SOURCE' as it is." (eq 'root (car phpstan-executable))) (list (expand-file-name (cdr phpstan-executable) (php-project-get-root-dir)))) - ((and (stringp phpstan-executable) (file-exists-p phpstan-executable)) + ((and (stringp phpstan-executable) (file-executable-p phpstan-executable)) (list phpstan-executable)) ((and phpstan-flycheck-auto-set-executable (listp phpstan-executable) @@ -297,7 +297,7 @@ it returns the value of `SOURCE' as it is." (let ((vendor-phpstan (expand-file-name "vendor/bin/phpstan" (php-project-get-root-dir)))) (cond - ((file-exists-p vendor-phpstan) (list vendor-phpstan)) + ((file-executable-p vendor-phpstan) (list vendor-phpstan)) ((executable-find "phpstan") (list (executable-find "phpstan"))) (t (error "PHPStan executable not found")))))))