aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--src/relx.erl6
-rw-r--r--src/rlx_cmd_args.erl4
-rw-r--r--src/rlx_prv_discover.erl6
-rw-r--r--src/rlx_state.erl4
-rw-r--r--test/rlx_discover_SUITE.erl2
6 files changed, 12 insertions, 12 deletions
diff --git a/README.md b/README.md
index 3036686..0eabf99 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ Options
| -o | --output-dir | string | ./ | The output directory for the release |
| -l | --lib-dir | string | | Additional dirs to search for OTP apps |
| -p | --path | string | | Additional dirs to add to Erlang code path |
-| | --disable-default-libs | boolean | false | Disable use of the default system added lib dirs |
+| | --default-libs | boolean | true | Whether to use the default system added lib dirs (means you must add them all manually) |
| -V | --verbose | integer | 0 | The verbosity level between 0 and 2 |
| -a | --override_app | string | | An app name and a directory to override in the form appname:dir |
| -c | --config | string | ./relx.config | Config file path |
diff --git a/src/relx.erl b/src/relx.erl
index 2aac8e4..f6575a1 100644
--- a/src/relx.erl
+++ b/src/relx.erl
@@ -192,9 +192,9 @@ opt_spec_list() ->
"Additional dir that should be searched for OTP Apps"},
{path, $p, "path", string,
"Additional dir to add to the code path"},
- {disable_default_libs, undefined, "disable-default-libs",
- {boolean, false},
- "Disable the default system added lib dirs (means you must add them all manually"},
+ {default_libs, undefined, "default-libs",
+ {boolean, true},
+ "Whether to use the default system added lib dirs (means you must add them all manually). Default is true"},
{log_level, $V, "verbose", {integer, 1},
"Verbosity level, maybe between 0 and 2"},
{override_app, $a, "override_app", string,
diff --git a/src/rlx_cmd_args.erl b/src/rlx_cmd_args.erl
index 619163a..621b626 100644
--- a/src/rlx_cmd_args.erl
+++ b/src/rlx_cmd_args.erl
@@ -245,8 +245,8 @@ create_root_dir(Opts, Acc) ->
-spec create_disable_default_libs([getopt:option()], rlx_state:cmd_args()) ->
{ok, rlx_state:cmd_args()} | relx:error().
create_disable_default_libs(Opts, Acc) ->
- Def = proplists:get_value(disable_default_libs, Opts, false),
- create_upfrom(Opts, [{disable_default_libs, Def} | Acc]).
+ Def = proplists:get_value(default_libs, Opts, true),
+ create_upfrom(Opts, [{default_libs, Def} | Acc]).
-spec create_upfrom([getopt:option()], rlx_state:cmd_args()) ->
{ok, rlx_state:cmd_args()} | relx:error().
diff --git a/src/rlx_prv_discover.erl b/src/rlx_prv_discover.erl
index 5e54828..4f297fe 100644
--- a/src/rlx_prv_discover.erl
+++ b/src/rlx_prv_discover.erl
@@ -75,10 +75,10 @@ add(Rel, Dict) ->
get_lib_dirs(State) ->
LibDirs0 = rlx_state:lib_dirs(State),
- case rlx_state:get(State, disable_default_libs, false) of
- true ->
- LibDirs0;
+ case rlx_state:get(State, default_libs, true) of
false ->
+ LibDirs0;
+ true ->
lists:flatten([LibDirs0,
add_common_project_dirs(State),
add_system_lib_dir(State),
diff --git a/src/rlx_state.erl b/src/rlx_state.erl
index b35baf3..4c6df07 100644
--- a/src/rlx_state.erl
+++ b/src/rlx_state.erl
@@ -135,8 +135,8 @@ new(PropList, Targets)
default_configured_release={proplists:get_value(relname, PropList, undefined),
proplists:get_value(relvsn, PropList, undefined)}},
rlx_state:put(create_logic_providers(State0),
- disable_default_libs,
- proplists:get_value(disable_default_libs, PropList, false)).
+ default_libs,
+ proplists:get_value(default_libs, PropList, true)).
%% @doc the actions targeted for this system
-spec actions(t()) -> [action()].
diff --git a/test/rlx_discover_SUITE.erl b/test/rlx_discover_SUITE.erl
index c4455e1..93a576b 100644
--- a/test/rlx_discover_SUITE.erl
+++ b/test/rlx_discover_SUITE.erl
@@ -73,7 +73,7 @@ normal_case(Config) ->
[{create_random_name("lib_app2_"), create_random_vsn()}
|| _ <- lists:seq(1, 100)]],
State0 = rlx_state:put(proplists:get_value(state, Config),
- disable_default_libs, true),
+ default_libs, false),
{DiscoverProvider, {ok, State1}} = rlx_provider:new(rlx_prv_discover, State0),
{ok, State2} = rlx_provider:do(DiscoverProvider, State1),
lists:foreach(fun(App) ->