diff options
author | Jordan Wilberding <[email protected]> | 2014-11-03 16:34:36 -0800 |
---|---|---|
committer | Jordan Wilberding <[email protected]> | 2014-11-03 16:34:36 -0800 |
commit | 0066f8f37819c5ea1776655ea6cdffab4c95bcd5 (patch) | |
tree | 02d9330baaac9192e354775b62d95f74231765e5 /src | |
parent | 9d550533bb1440e93f4a014cb6303f427a51f2dc (diff) | |
parent | 5fbc0518ad86e3c3d109c4f714673c854cba9ed6 (diff) | |
download | relx-0066f8f37819c5ea1776655ea6cdffab4c95bcd5.tar.gz relx-0066f8f37819c5ea1776655ea6cdffab4c95bcd5.tar.bz2 relx-0066f8f37819c5ea1776655ea6cdffab4c95bcd5.zip |
Merge pull request #251 from tsloughter/master
Bug fix and cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/rlx_cmd_args.erl | 22 | ||||
-rw-r--r-- | src/rlx_config.erl | 3 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/rlx_cmd_args.erl b/src/rlx_cmd_args.erl index 44fd226..a47c2ee 100644 --- a/src/rlx_cmd_args.erl +++ b/src/rlx_cmd_args.erl @@ -22,7 +22,7 @@ -module(rlx_cmd_args). -export([args2state/2, - format_error/1]). + format_error/2]). -include("relx.hrl"). @@ -48,10 +48,10 @@ args2state(Opts, Targets) -> Error end. --spec format_error(Reason::term()) -> iolist(). -format_error({invalid_targets, Targets}) -> +-spec format_error(Reason::term(), rlx_state:t()) -> iolist(). +format_error({invalid_targets, Targets}, _) -> io_lib:format("One config must be specified! not ~p~n", [Targets]); -format_error({invalid_option_arg, Arg}) -> +format_error({invalid_option_arg, Arg}, _) -> case Arg of {goals, Goal} -> io_lib:format("Invalid Goal argument -g ~p~n", [Goal]); @@ -68,20 +68,20 @@ format_error({invalid_option_arg, Arg}) -> {path, Path} -> io_lib:format("Invalid code path argument -n ~p~n", [Path]) end; -format_error({invalid_config_file, Config}) -> +format_error({invalid_config_file, Config}, _) -> io_lib:format("Invalid configuration file specified: ~p", [Config]); -format_error({invalid_caller, Caller}) -> +format_error({invalid_caller, Caller}, _) -> io_lib:format("Invalid caller specified: ~s", [Caller]); -format_error({failed_to_parse, Spec}) -> +format_error({failed_to_parse, Spec}, _) -> io_lib:format("Unable to parse spec ~s", [Spec]); -format_error({failed_to_parse_override, QA}) -> +format_error({failed_to_parse_override, QA}, _) -> io_lib:format("Failed to parse app override ~s", [QA]); -format_error({not_directory, Dir}) -> +format_error({not_directory, Dir}, _) -> io_lib:format("Library directory does not exist: ~s", [Dir]); -format_error({invalid_log_level, LogLevel}) -> +format_error({invalid_log_level, LogLevel}, _) -> io_lib:format("Invalid log level specified -V ~p, log level must be in the" " range 0..3", [LogLevel]); -format_error({invalid_target, Target}) -> +format_error({invalid_target, Target}, _) -> io_lib:format("Invalid action specified: ~s", [Target]). %%%=================================================================== diff --git a/src/rlx_config.erl b/src/rlx_config.erl index 07ac2c5..c838c18 100644 --- a/src/rlx_config.erl +++ b/src/rlx_config.erl @@ -285,6 +285,7 @@ merge_configs([{Key, Value} | CliTerms], ConfigTerms) -> end. parse_vsn(Vsn) when Vsn =:= semver ; Vsn =:= "semver" -> - binary_to_list(ec_git_vsn:vsn([])); + {ok, V} = ec_git_vsn:vsn([]), + V; parse_vsn(Vsn) -> Vsn. |