aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rcl_cmd_args.erl8
-rw-r--r--src/rcl_prv_assembler.erl4
2 files changed, 10 insertions, 2 deletions
diff --git a/src/rcl_cmd_args.erl b/src/rcl_cmd_args.erl
index f12d216..ab073a2 100644
--- a/src/rcl_cmd_args.erl
+++ b/src/rcl_cmd_args.erl
@@ -32,8 +32,8 @@
-spec args2state({error, Reason::term()} | {[getopt:option()], [string()]}) ->
{ok, {rcl_state:t(), [string()]}} |
relcool:error().
-args2state(Error={error, _}) ->
- Error;
+args2state({error, Detail}) ->
+ ?RCL_ERROR({opt_parse, Detail});
args2state({ok, {Opts, Targets}}) ->
RelName = proplists:get_value(relname, Opts, undefined),
RelVsn = proplists:get_value(relvsn, Opts, undefined),
@@ -52,6 +52,10 @@ args2state({ok, {Opts, Targets}}) ->
end.
-spec format_error(Reason::term()) -> iolist().
+format_error({opt_parse, {invalid_option, Opt}}) ->
+ io_lib:format("invalid option ~s~n", [Opt]);
+format_error({opt_parse, Arg}) ->
+ io_lib:format("~p~n", [Arg]);
format_error({invalid_option_arg, Arg}) ->
case Arg of
{goals, Goal} ->
diff --git a/src/rcl_prv_assembler.erl b/src/rcl_prv_assembler.erl
index d3fe4ad..a118b12 100644
--- a/src/rcl_prv_assembler.erl
+++ b/src/rcl_prv_assembler.erl
@@ -235,10 +235,14 @@ make_boot_script(State, Release, OutputDir, RelDir) ->
[ReleaseFile, Options]),
case make_script(Name, Options) of
ok ->
+ rcl_log:error(rcl_state:log(State),
+ "release successfully created!"),
{ok, State};
error ->
?RCL_ERROR({release_script_generation_error, ReleaseFile});
{ok, _, []} ->
+ rcl_log:error(rcl_state:log(State),
+ "release successfully created!"),
{ok, State};
{ok,Module,Warnings} ->
?RCL_ERROR({release_script_generation_warn, Module, Warnings});