[PATCH consfigurator] secret-key-imported: call gpg with --batch

David Bremner david at tethera.net
Mon Sep 11 02:00:56 BST 2023


Without these arguments, gpg will fail with a message about

        inappropriate ioctl for device.

This is similar to the issue discussed at

     https://dev.gnupg.org/T5885

Add the --batch argument to keep gpg from trying to interact with the
tty. According to the docs --no-tty is only about restricting output.

Signed-off-by: David Bremner <david at tethera.net>
---
 src/property/gnupg.lisp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/property/gnupg.lisp b/src/property/gnupg.lisp
index 428c794..6fb8ddd 100644
--- a/src/property/gnupg.lisp
+++ b/src/property/gnupg.lisp
@@ -63,4 +63,4 @@ integer."
      (declare (ignore err))
      (and (zerop exit) (re:scan #?/^sec\s/ out))))
   (:apply (mrun :input (get-data-stream "--pgp-seckey" fingerprint)
-                "gpg" "--import")))
+                "gpg" "--batch" "--no-tty" "--import")))
-- 
2.40.1




More information about the sgo-software-discuss mailing list