You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a configuration object uses inheritance, non-optional environment variables are searched for before further file overlays are applied, which breaks file overlays.
Reproduction Steps
Create the following two configuration files:
File: src/main/resources/application.conf
base = {}
child = ${base} {
foo = ${FOOBAR}
}
File: src/test/resources/application.conf
child.foo = "test-foo"
When attempting to run sbt test, the following error will appear:
Caused by: sbt.ForkMain$ForkError: com.typesafe.config.ConfigException$UnresolvedSubstitution:
application.conf @ file:/[...]/target/scala-2.13/classes/application.conf: 248: Could not resolve
substitution to a value: ${FOOBAR}
In contrast, if we change src/main/resources/application.conf to be the following, the error does not appear and child.foo is correctly set to test-foo:
child = {
foo = ${FOOBAR}
}
Expected Behavior
The configuration value for child.foo should be test-foo for both cases.
Actual Behavior
Inheritance breaks the first case.
The text was updated successfully, but these errors were encountered:
Typesafe config version: 1.4.3
Summary
When a configuration object uses inheritance, non-optional environment variables are searched for before further file overlays are applied, which breaks file overlays.
Reproduction Steps
Create the following two configuration files:
File:
src/main/resources/application.conf
File:
src/test/resources/application.conf
When attempting to run
sbt test
, the following error will appear:In contrast, if we change
src/main/resources/application.conf
to be the following, the error does not appear andchild.foo
is correctly set totest-foo
:Expected Behavior
The configuration value for
child.foo
should betest-foo
for both cases.Actual Behavior
Inheritance breaks the first case.
The text was updated successfully, but these errors were encountered: