From 45f158ccbd81159c51acdfd50deedf75c3b619af Mon Sep 17 00:00:00 2001 From: Norio Suzuki Date: Wed, 13 Dec 2023 08:09:17 +0900 Subject: [PATCH] Fix a target path for docker execution --- phpstan.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phpstan.el b/phpstan.el index bea7c27..7da2c33 100644 --- a/phpstan.el +++ b/phpstan.el @@ -338,15 +338,17 @@ it returns the value of `SOURCE' as it is." (defun phpstan-analyze-this-file () "Analyze current buffer-file using PHPStan." (interactive) - (let ((file (expand-file-name (or buffer-file-name - (read-file-name "Choose a PHP script: "))))) + (let ((file (phpstan-normalize-path + (expand-file-name (or buffer-file-name + (read-file-name "Choose a PHP script: ")))))) (compile (mapconcat #'shell-quote-argument (phpstan-get-command-args :include-executable t :args (list file)) " ")))) ;;;###autoload (defun phpstan-analyze-file (file) "Analyze a PHP script FILE using PHPStan." - (interactive (list (expand-file-name (read-file-name "Choose a PHP script: ")))) + (interactive (list (phpstan-normalize-path + (expand-file-name (read-file-name "Choose a PHP script: "))))) (compile (mapconcat #'shell-quote-argument (phpstan-get-command-args :include-executable t :args (list file)) " ")))