[stage] Make config concatenation actually work

This commit is contained in:
David Biancolin
2020-05-16 22:46:39 +00:00
parent 85b555dbce
commit 73f8ec5017

View File

@@ -11,7 +11,12 @@ private[stage] object UnderscoreDelimitedConfigsAnnotation extends HasShellOptio
override val options = Seq(
new ShellOption[String](
longOption = "legacy-configs",
toAnnotationSeq = a => Seq(new ConfigsAnnotation(a.split("_"))),
toAnnotationSeq = a => {
val split = a.split('.')
val packageName = split.init.mkString(".")
val configs = split.last.split("_")
Seq(new ConfigsAnnotation(configs map { config => s"${packageName}.${config}" } ))
},
helpText = "A string of underscore-delimited configs (configs have decreasing precendence from left to right).",
shortOption = Some("LC")
)