summaryrefslogtreecommitdiff
path: root/src/rebar_prv_dialyzer.erl
diff options
context:
space:
mode:
authorJames Fish <james@fishcakez.com>2015-03-05 14:11:53 +0000
committerJames Fish <james@fishcakez.com>2015-03-05 15:05:38 +0000
commit53e43298ba7c79a2a9df69e8bc9e196186b6e925 (patch)
treee71d6d4a24464f6f60df3d232a833ba5393b49c8 /src/rebar_prv_dialyzer.erl
parent7f60448d333b2fa78de2de14f0f047eb12116bc9 (diff)
Fix dialyzer active otp release detection
Diffstat (limited to 'src/rebar_prv_dialyzer.erl')
-rw-r--r--src/rebar_prv_dialyzer.erl19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/rebar_prv_dialyzer.erl b/src/rebar_prv_dialyzer.erl
index 7268f06..f140f1b 100644
--- a/src/rebar_prv_dialyzer.erl
+++ b/src/rebar_prv_dialyzer.erl
@@ -91,24 +91,7 @@ get_plt_location(State) ->
rebar_state:get(State, dialyzer_plt, DefaultPlt).
default_plt() ->
- ".rebar3.otp-" ++ otp_version() ++ ".plt".
-
-otp_version() ->
- Release = erlang:system_info(otp_release),
- try otp_version(Release) of
- Vsn ->
- Vsn
- catch
- error:_ ->
- Release
- end.
-
-otp_version(Release) ->
- File = filename:join([code:root_dir(), "releases", Release, "OTP_VERSION"]),
- {ok, Contents} = file:read_file(File),
- [Vsn] = binary:split(Contents, [<<$\n>>], [global, trim]),
- [_ | _] = unicode:characters_to_list(Vsn).
-
+ ".rebar3.otp-" ++ rebar_utils:otp_release() ++ ".plt".
do(State, Plt, Apps) ->
{PltWarnings, State1} = update_proj_plt(State, Plt, Apps),