diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 00a1c35..d704d2d 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -257,11 +257,10 @@ doterl_compile(Config, OutDir, MoreSources) -> ok = filelib:ensure_dir(filename:join("ebin", "dummy.beam")), CurrPath = code:get_path(), true = code:add_path(filename:absname("ebin")), + OutDir1 = proplists:get_value(outdir, ErlOpts, OutDir), rebar_base_compiler:run(Config, NewFirstErls, OtherErls, fun(S, C) -> - internal_erl_compile(C, S, - proplists:get_value(outdir, ErlOpts, OutDir), - ErlOpts) + internal_erl_compile(C, S, OutDir1, ErlOpts) end), true = code:set_path(CurrPath), ok.