From f1aa0bfe1b46b811de125e9a28164942018046a0 Mon Sep 17 00:00:00 2001 From: Ivan Stanislavciuc Date: Mon, 4 Apr 2022 13:18:19 +0200 Subject: [PATCH] Fix #60 when scalac options specified in ThisBuild scope by user are ignored --- .../scala/io/github/davidgregory084/TpolecatPlugin.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/io/github/davidgregory084/TpolecatPlugin.scala b/src/main/scala/io/github/davidgregory084/TpolecatPlugin.scala index 6f78a93..dd4b3dc 100644 --- a/src/main/scala/io/github/davidgregory084/TpolecatPlugin.scala +++ b/src/main/scala/io/github/davidgregory084/TpolecatPlugin.scala @@ -120,16 +120,16 @@ object TpolecatPlugin extends AutoPlugin { tpolecatCiModeEnvVar := "SBT_TPOLECAT_CI", tpolecatReleaseModeEnvVar := "SBT_TPOLECAT_RELEASE", tpolecatOptionsMode := { - if (sys.env.get(tpolecatReleaseModeEnvVar.value).nonEmpty) ReleaseMode - else if (sys.env.get(tpolecatCiModeEnvVar.value).nonEmpty) CiMode - else if (sys.env.get(tpolecatDevModeEnvVar.value).nonEmpty) DevMode + if (sys.env.contains(tpolecatReleaseModeEnvVar.value)) ReleaseMode + else if (sys.env.contains(tpolecatCiModeEnvVar.value)) CiMode + else if (sys.env.contains(tpolecatDevModeEnvVar.value)) DevMode else tpolecatDefaultOptionsMode.value } ) ++ commandAliases override def projectSettings: Seq[Setting[_]] = Seq( Def.derive( - scalacOptions := scalacOptionsFor(scalaVersion.value, tpolecatScalacOptions.value) + scalacOptions ++= scalacOptionsFor(scalaVersion.value, tpolecatScalacOptions.value) ), tpolecatDevModeOptions := ScalacOptions.default, Def.derive(