pyhocon icon indicating copy to clipboard operation
pyhocon copied to clipboard

Nested variable substitution not working

Open kennethrithvik opened this issue 4 years ago • 2 comments

base.conf

hello="world" hello1=${hello}

derived.conf

test={include "base.conf"}

this does not resolve the hello1 in base.conf and throws error. This works in HOCON

Cannot resolve variable ${hello}

kennethrithvik avatar Jan 20 '21 09:01 kennethrithvik

Same problem here, base.conf

service = api
service = ${ENV_SERVICE}

derived.conf

include "base.conf"

With files in the same directory.

>>> file_path = os.path.join... # path to file, correctly resolved
>>> hocon_config = pyhocon.ConfigFactory.parse_file(file_path)
>>> hocon_config.history['service']
Screenshot 2021-01-27 at 13 54 00

whisust avatar Jan 27 '21 12:01 whisust

I have the same problem

xafilox avatar Mar 30 '23 12:03 xafilox