sbt-pgp icon indicating copy to clipboard operation
sbt-pgp copied to clipboard

SBT_PGP_USE_GPG is a system property, not an environment variable

Open smarter opened this issue 5 years ago • 0 comments

The README says:

Or by setting SBT_PGP_USE_GPG environment variable to 0.

This is wrong on two counts:

  • https://github.com/sbt/sbt-pgp/blob/90465fcde014eb0688f0086fdec56db60ebfbfd6/sbt-pgp/src/main/scala/com/jsuereth/sbtpgp/PgpSettings.scala#L22-L25
  • While setting the system property to 0 would indeed result in java.lang.Boolean.getBoolean("SBT_PGP_USE_GPG") returning false, the same would happen if it was set to 1. Boolean system properties should be set to either "false" or "true" to be properly parsed by java.lang.Boolean.getBoolean.

smarter avatar Sep 20 '19 20:09 smarter