Skip to content

Commit

Permalink
save and restore default-directory around execution of mix
Browse files Browse the repository at this point in the history
  • Loading branch information
pragdave committed Nov 21, 2013
1 parent 5a834a5 commit f79e8ef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions elixir-mix.el
Expand Up @@ -271,9 +271,12 @@ Returns the compilation buffer."
(defun elixir-mix-execute (command)
"Run a mix command."
(interactive "Mmix: ")
(elixir-mix--establish-project-root-directory)
(elixir-mix-task-runner elixir-mix-buffer-name
(elixir-mix--build-runner-cmdlist command)))
(let ((old-directory default-directory))
(elixir-mix--establish-project-root-directory)
(elixir-mix-task-runner elixir-mix-buffer-name
(elixir-mix--build-runner-cmdlist command))
(cd old-directory)))


;;;###autoload
(define-minor-mode global-elixir-mix-mode
Expand Down

0 comments on commit f79e8ef

Please sign in to comment.