]> git.eshelyaron.com Git - emacs.git/commitdiff
Make mml-sec-tests not hang waiting for input
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 1 Oct 2020 03:17:01 +0000 (05:17 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 1 Oct 2020 03:17:01 +0000 (05:17 +0200)
* lisp/gnus/mml-sec.el (mml-secure-epg-sign): Only query if we're
running interactively.  This makes a test not hang.

lisp/gnus/mml-sec.el

index 0a842061b323ea194823b148bd8f17d605552298..74af99da7e3397cc7e343795a7f24ad8b7cba285 100644 (file)
@@ -988,7 +988,8 @@ Returns non-nil if the user has chosen to use SENDER."
         (signers (mml-secure-signers context signer-names))
         signature micalg)
     (unless signers
-      (if (mml-secure-sender-sign-query protocol sender)
+      (if (and (not noninteractive)
+              (mml-secure-sender-sign-query protocol sender))
           (setq signer-names (mml-secure-signer-names protocol sender)
                 signers (mml-secure-signers context signer-names)))
       (unless signers