summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ldg-test.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ldg-test.el b/lisp/ldg-test.el
index a1ae3974..478c62d8 100644
--- a/lisp/ldg-test.el
+++ b/lisp/ldg-test.el
@@ -66,6 +66,10 @@
ledger-source-directory args))
(kill-new args)
(message "Testing: ledger %s" args)
- (async-shell-command (format "\"%s\" %s" command args))))))
+ (let ((prev-directory default-directory))
+ (cd ledger-source-directory)
+ (unwind-protect
+ (async-shell-command (format "\"%s\" %s" command args))
+ (cd prev-directory)))))))
(provide 'ldg-test)