Thin wrapper over config::get() that resolves data/config.yml relative to
the app directory (an absolute path), instead of the config package's
default search from the current working directory. This avoids the cwd pitfall
where a helper or handler is evaluated with a working directory other than the
app root and config::get() cannot find the file.
Usage
aurora_config(
value = NULL,
...,
dir = ".",
file = NULL,
config = Sys.getenv("R_CONFIG_ACTIVE", "default")
)Arguments
- value
Config value to read;
NULL(default) returns the whole active configuration as a list.- ...
Passed to
config::get().- dir
App directory (used to locate
data/config.yml).- file
Explicit path to the config file; overrides
dirwhen supplied.- config
Active configuration name; defaults to the
R_CONFIG_ACTIVEenvironment variable or"default".