diff options
author | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2015-03-23 17:40:37 -0700 |
---|---|---|
committer | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2015-03-23 18:22:27 -0700 |
commit | 5a42523cd564544487a8198764c83e12b49e93fd (patch) | |
tree | e1f461d37fd2debd2eaafaeaa2e9e9ee9257d840 /src | |
parent | 549c63b75d2b97165816a5975481595c3dc8bdf1 (diff) |
handle additional errors returned from `getopt:parse/2`
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_core.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 1c1bf66..6abab68 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -93,7 +93,11 @@ process_command(State, Command) -> State2 = rebar_state:command_parsed_args(State1, Args), do(TargetProviders, State2); {error, {invalid_option, Option}} -> - {error, io_lib:format("Invalid option ~s on task ~p", [Option, Command])} + {error, io_lib:format("Invalid option ~s on task ~p", [Option, Command])}; + {error, {invalid_option_arg, {Option, Arg}}} -> + {error, io_lib:format("Invalid argument ~s to option ~s", [Arg, Option])}; + {error, {missing_option_arg, Option}} -> + {error, io_lib:format("Missing argument to option ~s", [Option])} end end end. |