Closed andrie closed 3 years ago
Hi @andrie , @hadley
Is it possible to have a switcher between old and new behaviour? We have something like that:
config::get("APP", config = "default", file = "config.yml")
with next content:
default:
db2:
db2Username: !expr credential <- getDB2Creds(); credential$db2Username
db2Password: !expr credential <- getDB2Creds(); credential$db2Password
which now is broken for us
thanks
At the moment, all
!expr
statements in the config file are evaluated, even if these are not relevant for the active configuration. This PR proposes a fix to read the yaml file witheval.expr = FALSE
(using a handler) and then evaluates these statements only after the merge is completed. I also add additional test cases (that fail with current code base, but passes with the proposed fix).This is hopefully a fix for #20