anchor.diff:      getopt:usage(opt_spec_list(), "relcool", "[*release-specification-file*]").
   
   
  --spec report_error(term()) -> none().
  -report_error(Error) ->
  +-spec report_error(rcl_state:t(), term()) -> none().
  +report_error(State, Error) ->
       io:format("~s~n", [to_error(Error)]),
       usage(),
  -    erlang:halt(127).
  +    case rcl_state:caller(State) of
  +        command_line ->
  +            erlang:halt(127);
  +        api ->
  +            Error
  +    end.
   
   -spec to_error(string() | {error, Reason::term()}) -> string().
   to_error(String) when erlang:is_list(String) ->
  
positive.code:     OptSpecList = opt_spec_list(),
      case rcl_cmd_args:args2state(getopt:parse(OptSpecList, Args)) of
          {ok, {State, _Target}} ->
              run_relcool_process(State);
          Error={error, _} ->
              report_error(Error)
      end.
  
  -spec opt_spec_list() -> [getopt:option_spec()].
  opt_spec_list() ->
  
negative.code: %%% @doc
  -module(relcool).
  
  -export([main/1,
           do/7,
           opt_spec_list/0]).
  
  %%============================================================================
  %% types
  