[erlang-questions] Paths in Common Test app.config
Roger Lipscombe
roger@REDACTED
Fri Nov 17 20:20:59 CET 2017
It appears that Common Test runs my suites from an arbitrary current
directory (somewhere under "logs").
This means that I cannot reliably use relative paths in my
'app.config' file. For example, I can't easily configure the paths to
my TLS certificate files without monkeying around with the current
working directory before calling application:ensure_started(my_app).
Currently, I've got some code that walks back up the directory tree --
with file:set_cwd("..") -- until it finds a marker file (currently
"rebar.config"), and then I specify the paths relative to this.
This seems ... brittle.
What do others do to deal with this?
More information about the erlang-questions
mailing list