When I run rebar3 shell
I get this error:
===> Error reading file rebar.config: 1: bad term
I’m trying to establish an environment variable with a default value at start time. Here’s my rebar.config file:
{erl_opts, [debug_info, {d, 'DBFOLDER', os:getenv('DBFOLDER', "database")}]}.
{cover_enabled, true}.
{deps, [rocksdb]}.
{plugins, [steamroller, {rebar3_dialyzer_html, "0.2.0"}]}.
{
relx,
[
{release, {src, "0.1.0"}, [event_store, rocksdb, mnesia]},
{mode, dev},
{dev_mode, true},
{include_erts, false},
{extended_start_script, true},
%% automatically picked up if the files
%% exist but can be set manually, which
%% is required if the names aren't exactly
%% sys.config and vm.args
{sys_config, "./config/sys.config"},
{vm_args, "./config/vm.args"}
%% the .src form of the configuration files do
%% not require setting RELX_REPLACE_OS_VARS
%% {sys_config_src, "./config/sys.config.src"},
%% {vm_args_src, "./config/vm.args.src"}
]
}.
{
profiles,
[
{
prod,
[
%{erl_opts, [{d, 'DBFOLDER', os:getenv("DBFOLDER", "database")}]},
{
relx,
[
%% prod is the default mode when prod
%% profile is used, so does not have
%% to be explicitly included like this
{mode, prod}
%% use minimal mode to exclude ERTS
%% {mode, minimal}
]
}
]
}
]
}.
{
steamroller,
[
{line_length, 100},
{indent, 4},
{inputs, ["rebar.config", "{src,test,include}/*.{[he]rl,app.src}"]}
]
}.
{dialyzer, [{output_format, raw}]}.