From 28b86bb498f8d292e046fc783b864958656edb7e Mon Sep 17 00:00:00 2001 From: Sergei Winitzki Date: Fri, 21 Oct 2022 20:04:33 +0200 Subject: [PATCH] Fix issue 191 gpg legacy (#197) * Use gpglegacy=true when gpg is 2.0 but not 2.1 --- sbt-pgp/src/main/scala/com/jsuereth/sbtpgp/PgpSigner.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbt-pgp/src/main/scala/com/jsuereth/sbtpgp/PgpSigner.scala b/sbt-pgp/src/main/scala/com/jsuereth/sbtpgp/PgpSigner.scala index 54a724c..5e9ac63 100644 --- a/sbt-pgp/src/main/scala/com/jsuereth/sbtpgp/PgpSigner.scala +++ b/sbt-pgp/src/main/scala/com/jsuereth/sbtpgp/PgpSigner.scala @@ -47,7 +47,7 @@ class CommandLineGpgSigner( (m.toLong, splitDot(ns).headOption.getOrElse(0L)) case _ => (0L, 0L) } - def isLegacyGpg: Boolean = gpgVersionNumber._1 < 2L + def isLegacyGpg: Boolean = (gpgVersionNumber._1 < 2L) || (gpgVersionNumber._1 == 2L && gpgVersionNumber._2 == 0L) def sign(file: File, signatureFile: File, s: TaskStreams): File = PgpSigner.lock.synchronized { if (signatureFile.exists) IO.delete(signatureFile) val passargs: Seq[String] = (optPassphrase map { passArray =>