Skip to content

Commit

Permalink
CLI options printing
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian-panek-vmltech committed Nov 4, 2022
1 parent d63e961 commit c1b71a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin/src/main/kotlin/io/wttech/gradle/config/cli/Cli.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ class Cli(val definition: Definition) {
println(" ${prop.label.get()} (${prop.name})")
println(" Value: ${prop.value()?.toString()?.ifBlank { "<empty>" }}")

if (prop is StringProp && prop.valueType.get() != StringProp.ValueType.BOOL && prop.options.get().isNotEmpty()) {
println(" Options: ${prop.options.get().joinToString(", ")}")
}

val desc = prop.description.orNull?.trim()
if (!desc.isNullOrBlank()) {
if (desc.contains("\n")) {
Expand Down

0 comments on commit c1b71a7

Please sign in to comment.