Skip to content

Commit 125bb1c

Browse files
kermorgantzonuexe
authored andcommitted
return default-directory when php-project-get-root-dir fails (#110)
without working-directory, phpactor isn't very helpful.
1 parent 1b4642a commit 125bb1c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

phpactor.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ of GitHub.")
155155
(defun phpactor-get-working-dir ()
156156
"Return working directory of Phpactor."
157157
(directory-file-name
158-
(expand-file-name (php-project-get-root-dir))))
158+
(expand-file-name
159+
(or (php-project-get-root-dir) default-directory))))
159160

160161
(defun phpactor--expand-local-file-name (name)
161162
"Expand file name by `NAME'."

0 commit comments

Comments
 (0)