jdiazcano / cfg4k

Flexible and easy to use config library written in kotlin
Apache License 2.0
80 stars 6 forks source link

Resolving hocon variables does not work for quoted strings #51

Closed rocketraman closed 6 years ago

rocketraman commented 6 years ago

When resolving hocon variables, this works:

something {
  foo = "whatever"
  bar = ${something.foo}
}

but this does not:

something {
  foo = "whatever"
  bar = "${something.foo}"
}
rocketraman commented 6 years ago

Actually, looks like this may be a HOCON thing: it looks like substitutions are not made inside quoted strings. The spec (https://github.com/lightbend/config/blob/master/HOCON.md#substitutions) states:

Substitutions are not parsed inside quoted strings. To get a string containing a substitution, you must use value concatenation with the substitution in the unquoted portion

Therefore, I will go ahead and close this! Thanks for the back and forth on Slack :-)