diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 7b4094d..3c7507b 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - otp: ['23.3', '24.3', '25.2.1'] + otp: ['25.2.1'] rebar: ['3.20.0'] steps: diff --git a/rebar.config b/rebar.config index dfc6d17..95fd8db 100644 --- a/rebar.config +++ b/rebar.config @@ -11,7 +11,9 @@ {profiles, [{test, [{deps, [{meck, "~> 0.9.2"}]}]}]}. -{dialyzer, [{warnings, [no_return, unmatched_returns, error_handling, underspecs]}]}. +{dialyzer, + [{warnings, + [no_return, unmatched_returns, error_handling, missing_return, extra_return]}]}. {edoc_opts, [{todo, true}, diff --git a/src/rebar3_depup_prv.erl b/src/rebar3_depup_prv.erl index 437429e..912630e 100644 --- a/src/rebar3_depup_prv.erl +++ b/src/rebar3_depup_prv.erl @@ -56,7 +56,7 @@ opts() -> "Only update if the specified SemVer component (major, minor, or patch) has changed."}]. %% @private --spec do(rebar_state:t()) -> {ok, rebar_state:t()}. +-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, iodata()}. do(State) -> Opts = parse_opts(State), rebar_api:debug("Opts: ~p", [Opts]), @@ -87,8 +87,14 @@ do(State) -> %% @private -spec format_error(any()) -> binary(). format_error(Reason) -> - unicode:characters_to_binary( - io_lib:format("~tp", [Reason])). + case unicode:characters_to_binary( + io_lib:format("~tp", [Reason])) + of + {_Error, Bin, _Rest} -> + Bin; + Bin -> + Bin + end. parse_opts(State) -> {Args, _} = rebar_state:command_parsed_args(State),