summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-11-04 10:52:42 -0600
committerTristan Sloughter <t@crashfast.com>2014-11-04 10:52:42 -0600
commit083d54211eddd76980a285bd63c01e685c330c82 (patch)
tree19ab4064a3cca41697ab4528ca9f714aeeeb5739 /src
parented017289edd48410fb1a02f0058df4be02abe6bb (diff)
include relx options in tar command
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_tar.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rebar_prv_tar.erl b/src/rebar_prv_tar.erl
index 03117ff..ec1b8a3 100644
--- a/src/rebar_prv_tar.erl
+++ b/src/rebar_prv_tar.erl
@@ -27,16 +27,18 @@ init(State) ->
{example, "rebar tar"},
{short_desc, "Tar archive of release built of project."},
{desc, ""},
- {opts, []}])),
+ {opts, relx:opt_spec_list()}])),
{ok, State1}.
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
+ Options = rebar_state:command_args(State),
+ AllOptions = string:join(["release", "tar" | Options], " "),
case rebar_state:get(State, relx, []) of
[] ->
- relx:main(["release", "tar"]);
+ relx:main(AllOptions);
Config ->
- relx:main([{config, Config}], ["release", "tar"])
+ relx:main([{config, Config}], AllOptions)
end,
{ok, State}.