summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_prv_eunit.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rebar_prv_eunit.erl b/src/rebar_prv_eunit.erl
index b56c456..78412d0 100644
--- a/src/rebar_prv_eunit.erl
+++ b/src/rebar_prv_eunit.erl
@@ -334,10 +334,9 @@ validate_file(State, File) ->
end.
validate_module(_State, Module) ->
- Path = code:which(Module),
- case beam_lib:chunks(Path, [exports]) of
- {ok, _} -> ok;
- {error, beam_lib, _} -> {error, lists:concat(["Module `", Module, "' not found in project."])}
+ case code:which(Module) of
+ non_existing -> {error, lists:concat(["Module `", Module, "' not found in project."])};
+ _ -> ok
end.
resolve_eunit_opts(State) ->