diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-03-05 13:42:07 -0600 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-03-05 13:42:07 -0600 |
commit | 4297d5340843e0dd3dcf9f2099dca8fd28a459d1 (patch) | |
tree | d98721e69d94091010719f62fe8183b78f5fa957 /src | |
parent | 7e608a4c9ad50c54df69b859da9ba2e507f39cc4 (diff) | |
parent | 37850ed819861cfc72d1106e1ef7e298813b22d9 (diff) |
Merge pull request #227 from fishcakez/dialyzer_plt
Change PLT name and directory
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_dialyzer.erl | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/rebar_prv_dialyzer.erl b/src/rebar_prv_dialyzer.erl index cc53632..e7275c7 100644 --- a/src/rebar_prv_dialyzer.erl +++ b/src/rebar_prv_dialyzer.erl @@ -86,29 +86,12 @@ format_error(Reason) -> %% Internal functions get_plt_location(State) -> - BuildDir = rebar_state:get(State, base_dir, ?DEFAULT_BASE_DIR), - DefaultPlt = filename:join([BuildDir, default_plt()]), + BaseDir = rebar_dir:base_dir(State), + DefaultPlt = filename:join(BaseDir, default_plt()), 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). - + rebar_utils:otp_release() ++ ".plt". do(State, Plt, Apps) -> {PltWarnings, State1} = update_proj_plt(State, Plt, Apps), |