chimpler / pyhocon

HOCON parser for Python
Apache License 2.0
493 stars 117 forks source link

Substitution inside include not working #283

Open ankiiitraj opened 2 years ago

ankiiitraj commented 2 years ago

Substitution inside include is not working.

I confirmed it by running the same conf on pyhocon and hocon-parser (npm).

e.g.

include required(file(${CONF_HOME}/base.conf))

throws this error

pyparsing.ParseSyntaxException: Expected Re:('"(?:[^"\\\\\\n]|\\\\.)*"[ \\t]*'), found '$'  (at char 22), (line:1, col:23)

e.g. (added quotes)

include required(file("${CONF_HOME}/base.conf"))

throws this error

FileNotFoundError: [Errno 2] No such file or directory: '${CONF_HOME}/base.conf'
blutsvente commented 3 months ago

We would also like to get this fixed.