summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_eunit.erl11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
index 42c6fdd..b966985 100644
--- a/src/rebar_eunit.erl
+++ b/src/rebar_eunit.erl
@@ -87,13 +87,12 @@ eunit(Config, _AppFile) ->
%% for source files. Also copy files from src_dirs.
ErlOpts = rebar_utils:erl_opts(Config),
+ SrcDirs = rebar_utils:src_dirs(proplists:append_values(src_dirs, ErlOpts)),
SrcErls = lists:foldl(
- fun(Dir, Acc) ->
- lists:append(Acc, rebar_utils:find_files(Dir, ".*\\.erl\$"))
- end,
- [],
- rebar_utils:src_dirs(proplists:append_values(src_dirs, ErlOpts))
- ),
+ fun(Dir, Acc) ->
+ Files = rebar_utils:find_files(Dir, ".*\\.erl\$"),
+ lists:append(Acc, Files)
+ end, [], SrcDirs),
?DEBUG("SrcErls: ~s\n", [SrcErls]),
%% If it is not the first time rebar eunit is executed, there will be source