Permalink
Browse files

Merge pull request #4 from pragdave/save-directory

save and restore default-directory around execution of mix
  • Loading branch information...
2 parents 5a834a5 + f79e8ef commit 8e5c5a1e620cd9fb479ab6e192ea5174310b59b8 @tonini committed Nov 21, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 elixir-mix.el
View
@@ -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

0 comments on commit 8e5c5a1

Please sign in to comment.