소스 검색

Fix dialyzer tests on windows

pull/489/head
Viacheslav V. Kovalev 10 년 전
committed by Viacheslav Kovalev
부모
커밋
d734beb850
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. +9
    -0
      src/rebar_prv_dialyzer.erl

+ 9
- 0
src/rebar_prv_dialyzer.erl 파일 보기

@ -72,6 +72,7 @@ short_desc() ->
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
maybe_fix_env(),
?INFO("Dialyzer starting, this may take a while...", []),
code:add_pathsa(rebar_state:code_paths(State, all_deps)),
Plt = get_plt(State),
@ -91,6 +92,14 @@ do(State) ->
rebar_utils:cleanup_code_path(rebar_state:code_paths(State, default))
end.
%% This is used to workaround dialyzer quirk discussed here
%% https://github.com/rebar/rebar3/pull/489#issuecomment-107953541
%% Dialyzer gets default plt location wrong way by peeking HOME environment
%% variable which usually is not defined on Windows.
maybe_fix_env() ->
{ok, [[HomePath]]} = init:get_argument(home),
os:putenv("DIALYZER_PLT", filename:join(HomePath, ".dialyzer_plt")).
-spec format_error(any()) -> iolist().
format_error({error_processing_apps, Error}) ->
io_lib:format("Error in dialyzing apps: ~s", [Error]);

불러오는 중...
취소
저장