Skip to content

Commit 94d373a

Browse files
authored
Merge pull request #48 from suzuki/fix-source-path-for-docker
Fix a target path for docker execution
2 parents 084c5cf + 45f158c commit 94d373a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

phpstan.el

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,15 +338,17 @@ it returns the value of `SOURCE' as it is."
338338
(defun phpstan-analyze-this-file ()
339339
"Analyze current buffer-file using PHPStan."
340340
(interactive)
341-
(let ((file (expand-file-name (or buffer-file-name
342-
(read-file-name "Choose a PHP script: ")))))
341+
(let ((file (phpstan-normalize-path
342+
(expand-file-name (or buffer-file-name
343+
(read-file-name "Choose a PHP script: "))))))
343344
(compile (mapconcat #'shell-quote-argument
344345
(phpstan-get-command-args :include-executable t :args (list file)) " "))))
345346

346347
;;;###autoload
347348
(defun phpstan-analyze-file (file)
348349
"Analyze a PHP script FILE using PHPStan."
349-
(interactive (list (expand-file-name (read-file-name "Choose a PHP script: "))))
350+
(interactive (list (phpstan-normalize-path
351+
(expand-file-name (read-file-name "Choose a PHP script: ")))))
350352
(compile (mapconcat #'shell-quote-argument
351353
(phpstan-get-command-args :include-executable t :args (list file)) " ")))
352354

0 commit comments

Comments
 (0)