diff options
-rw-r--r-- | tests/openpgp/defs.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm index b198cddd9..5249ca9da 100644 --- a/tests/openpgp/defs.scm +++ b/tests/openpgp/defs.scm @@ -76,9 +76,14 @@ (string-append prefix "/" (basename (caddr t)))))))) -(define have-opt-always-trust +(define (gpg-has-option? option) (string-contains? (call-popen `(,(tool 'gpg) --dump-options) "") - "--always-trust")) + option)) + +(define have-opt-always-trust + (catch #f + (call-check `(,(tool 'gpg) --gpgconf-test --always-trust)) + #t)) (define GPG `(,(tool 'gpg) --no-permission-warning ,@(if have-opt-always-trust '(--always-trust) '()))) |