diff options
author | Eric <[email protected]> | 2013-01-04 10:33:54 -0500 |
---|---|---|
committer | Eric <[email protected]> | 2013-01-04 10:52:19 -0500 |
commit | 3a5cb6adf215e760068c9d3e7a07eb4f971cabf0 (patch) | |
tree | 718eb042995b56fd2145c0d7a932d1aecd53e0d5 /src/rcl_cmd_args.erl | |
parent | 344fa86b23205eebc3233cf9c69a8e9e145714ac (diff) | |
download | relx-3a5cb6adf215e760068c9d3e7a07eb4f971cabf0.tar.gz relx-3a5cb6adf215e760068c9d3e7a07eb4f971cabf0.tar.bz2 relx-3a5cb6adf215e760068c9d3e7a07eb4f971cabf0.zip |
provide the erlang lib dir and cwd as working libraries
This happens for every call unless the user passes
--disable-default-libs to relcool or {disable_default_libs, true} in
the relcool config.
Diffstat (limited to 'src/rcl_cmd_args.erl')
-rw-r--r-- | src/rcl_cmd_args.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rcl_cmd_args.erl b/src/rcl_cmd_args.erl index 9d829d3..6340201 100644 --- a/src/rcl_cmd_args.erl +++ b/src/rcl_cmd_args.erl @@ -170,11 +170,16 @@ create_root_dir(Opts, Acc) -> case Dir of undefined -> {ok, Cwd} = file:get_cwd(), - {ok, [{root_dir, Cwd} | Acc]}; + create_disable_default_libs(Opts, [{root_dir, Cwd} | Acc]); _ -> - {ok, [{root_dir, Dir} | Acc]} + create_disable_default_libs(Opts, [{root_dir, Dir} | Acc]) end. +-spec create_disable_default_libs([getopt:option()], rcl_state:cmd_args()) -> + {ok, rcl_state:cmd_args()} | relcool:error(). +create_disable_default_libs(Opts, Acc) -> + Def = proplists:get_value(disable_default_libs, Opts, false), + {ok, [{disable_default_libs, Def} | Acc]}. -spec check_lib_dirs([string()]) -> ok | relcool:error(). check_lib_dirs([]) -> |