diff --git a/modules/core/src/main/scala/scala/build/internals/EnvsUtil.scala b/modules/core/src/main/scala/scala/build/internals/EnvsUtil.scala index f33ccd2b20..217a2c9b80 100644 --- a/modules/core/src/main/scala/scala/build/internals/EnvsUtil.scala +++ b/modules/core/src/main/scala/scala/build/internals/EnvsUtil.scala @@ -1,5 +1,7 @@ package scala.build.internals +import scala.build.internals.ConsoleUtils.ScalaCliConsole + object EnvsUtil { def helpMessage(isPower: Boolean): String = s"""The following is the list of environment variables used and recognized by Scala CLI. @@ -22,6 +24,9 @@ object EnvsUtil { * @param passToIde * Whether to pass this variable to the IDE/BSP client (true by default, should only be * disabled for env vars which aren't safe to save on disk) + * @param requiresPower + * Whether this variable is related to a feature that requires power mode; also used for + * internal toggles and such */ case class EnvVar( name: String, @@ -31,8 +36,11 @@ object EnvsUtil { ) { def valueOpt: Option[String] = Option(System.getenv(name)) override def toString: String = s"$name=${valueOpt.getOrElse("")}" - def helpMessage(spaces: String): String = - s"$name$spaces${if requiresPower then "(power) " else ""}$description" + def helpMessage(spaces: String): String = { + val powerString = + if requiresPower then s"${ScalaCliConsole.GRAY}(power)${Console.RESET} " else "" + s"${Console.YELLOW}$name${Console.RESET}$spaces$powerString$description" + } } object EnvVar { trait EnvVarGroup {