Skip to content

Commit 17819d6

Browse files
authored
Merge pull request #38 from kermorgant/phpactor-invocation-fix
Fix invocation of phpactor by moving some parameters definitions
2 parents 3f8dc20 + a64d3db commit 17819d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

phpactor.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,16 @@
121121
(phpactor--add-history 'phpactor--rpc (list action arguments))
122122
(let ((json (json-encode (list :action action
123123
:parameters arguments)))
124-
(cmd (phpactor--make-command-string "rpc"
125-
(format "--working-dir=%s" (phpactor-get-working-dir))))
126124
(json-object-type 'plist)
127125
(json-array-type 'list)
128-
(output (get-buffer-create "*Phpactor Output*")))
126+
(output (get-buffer-create "*Phpactor Output*"))
127+
(cwd (phpactor-get-working-dir))
128+
(phpactor-executable (phpactor-find-executable)))
129129
(with-current-buffer output (erase-buffer))
130130
(with-current-buffer (get-buffer-create "*Phpactor Input*")
131131
(erase-buffer)
132132
(insert json)
133-
(call-process-region (point-min) (point-max) (phpactor-find-executable) nil output nil "rpc" (format "--working-dir=%s" (phpactor-get-working-dir)))
133+
(call-process-region (point-min) (point-max) phpactor-executable nil output nil "rpc" (format "--working-dir=%s" cwd))
134134
(with-current-buffer output
135135
(goto-char (point-min))
136136
(json-read-object)))))

0 commit comments

Comments
 (0)