emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnus-mock 88de2e8 05/27: Maybe clean up dirs if the sta


From: Stefan Monnier
Subject: [elpa] externals/gnus-mock 88de2e8 05/27: Maybe clean up dirs if the start process fails
Date: Tue, 1 Dec 2020 10:11:36 -0500 (EST)

branch: externals/gnus-mock
commit 88de2e8d7a80d73e47c721485182ae25eafbd036
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    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.
---
 gnus-mock.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gnus-mock.el b/gnus-mock.el
index bbf4745..715aa27 100644
--- a/gnus-mock.el
+++ b/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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]