aboutsummaryrefslogtreecommitdiffstats
path: root/src/relx.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2014-10-01 08:03:25 -0500
committerTristan Sloughter <[email protected]>2014-10-11 11:13:05 -0500
commite4849bd132b28ba1e1420686aadf8b2136c44fbd (patch)
tree6d37fc2e021e8a860056dbc2cb59361de132bc54 /src/relx.erl
parent2604b7f0e9e11ee2fae17816499aba180b9b9683 (diff)
downloadrelx-e4849bd132b28ba1e1420686aadf8b2136c44fbd.tar.gz
relx-e4849bd132b28ba1e1420686aadf8b2136c44fbd.tar.bz2
relx-e4849bd132b28ba1e1420686aadf8b2136c44fbd.zip
support config passed in as proplist instead of filename
Diffstat (limited to 'src/relx.erl')
-rw-r--r--src/relx.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/relx.erl b/src/relx.erl
index e9867a9..37918be 100644
--- a/src/relx.erl
+++ b/src/relx.erl
@@ -21,6 +21,7 @@
-module(relx).
-export([main/1,
+ main/2,
do/2,
do/7,
do/8,
@@ -44,6 +45,9 @@
%%============================================================================
-spec main([string()]) -> ok | error() | {ok, rlx_state:t()}.
main(Args) ->
+ main([], Args).
+
+main(ApiOptions, Args) ->
OptSpecList = opt_spec_list(),
Result = case getopt:parse(OptSpecList, Args) of
{ok, {Options, NonOptions}} ->
@@ -58,7 +62,7 @@ main(Args) ->
usage();
false ->
application:start(relx),
- do([{caller, command_line} | Options], NonOptions)
+ do(ApiOptions++[{caller, command_line} | Options], NonOptions)
end
end;
{error, Detail} ->