summaryrefslogtreecommitdiff
path: root/src/rebar_fetch.erl
diff options
context:
space:
mode:
authorKelly McLaughlin <kelly@kelly-mclaughlin.com>2015-02-06 11:31:41 -0700
committerKelly McLaughlin <kelly@kelly-mclaughlin.com>2015-02-06 11:31:41 -0700
commit29039bece6f1733099eb6b4eea67f47e37bc24e0 (patch)
tree45ccae5a777f068f6d7002b9ceb68bf027fe5ba9 /src/rebar_fetch.erl
parente3ff657dc2b302d2ec81b8439a0d182feb8cad6c (diff)
Change mock_pkg_resource to create ebin directory
Change mock_pkg_resource to use rebar_test_utils:create_empty_app so that an ebin directory is created which is a good expectation for a package. Also revert the check in rebar_fetch:download_source to check for an ebin directory before adding it to the code path for package installs. If a package does not have an ebin directory it is probably a good for an exception to be thrown.
Diffstat (limited to 'src/rebar_fetch.erl')
-rw-r--r--src/rebar_fetch.erl7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/rebar_fetch.erl b/src/rebar_fetch.erl
index 964ccb3..088a49a 100644
--- a/src/rebar_fetch.erl
+++ b/src/rebar_fetch.erl
@@ -46,12 +46,7 @@ download_source(AppDir, Source) ->
code:del_path(filename:absname(filename:join(AppDir1, "ebin"))),
ec_file:remove(filename:absname(AppDir1), [recursive]),
ok = ec_file:copy(FromDir, filename:absname(AppDir1), [recursive]),
- case ec_file:exists(filename:join(AppDir1, "ebin")) of
- true ->
- true = code:add_patha(filename:join(AppDir1, "ebin"));
- false ->
- ok
- end,
+ true = code:add_patha(filename:join(AppDir1, "ebin")),
true
end
catch