Skip to content

Commit

Permalink
Fix a target path for docker execution
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki committed Dec 12, 2023
1 parent 495e22f commit 45f158c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions phpstan.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)) " ")))

Expand Down

0 comments on commit 45f158c

Please sign in to comment.