[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/gnus-mock ee8800c 3/3: Maybe clean up dirs if the start p
From: |
Eric Abrahamsen |
Subject: |
[elpa] scratch/gnus-mock ee8800c 3/3: Maybe clean up dirs if the start process fails |
Date: |
Thu, 11 Oct 2018 14:11:08 -0400 (EDT) |
branch: scratch/gnus-mock
commit ee8800c6033442ddd741025783b05a346a551f22
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Maybe clean up dirs if the start process fails
* packages/gnus-mock/gnus-mock.el (gnus-mock-start): Check value of
gnus-mock-cleanup-p.
---
packages/gnus-mock/gnus-mock.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/packages/gnus-mock/gnus-mock.el b/packages/gnus-mock/gnus-mock.el
index bbf4745..715aa27 100644
--- a/packages/gnus-mock/gnus-mock.el
+++ b/packages/gnus-mock/gnus-mock.el
@@ -197,10 +197,13 @@ gnus-directory \"%s\"
(while (re-search-forward "REPLACE_ME" (point-max) t)
(replace-match mock-tmp-dir t))
(basic-save-buffer))
- (make-process :name "gnus-mock" :buffer nil
- :command (list gnus-mock-emacs-program
- "-Q" "--load" init-file)
- :stderr "*gnus mock errors*")))
+ (condition-case nil
+ (make-process :name "gnus-mock" :buffer nil
+ :command (list gnus-mock-emacs-program
+ "-Q" "--load" init-file)
+ :stderr "*gnus mock errors*")
+ (error (when gnus-mock-cleanup-p
+ (delete-directory mock-tmp-dir t))))))
(provide 'gnus-mock)
;;; gnus-mock.el ends here