diff options
author | Kelly McLaughlin <kelly@kelly-mclaughlin.com> | 2015-02-06 10:43:51 -0700 |
---|---|---|
committer | Kelly McLaughlin <kelly@kelly-mclaughlin.com> | 2015-02-06 10:43:51 -0700 |
commit | e3ff657dc2b302d2ec81b8439a0d182feb8cad6c (patch) | |
tree | 60326776baca04d78bddec6a6e8b02ab656f907e | |
parent | 507281f658f3a25b944b73ef52f9794355f6ed47 (diff) |
Ensure package ebin directory exists prior to adding to code path
-rw-r--r-- | src/rebar_fetch.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rebar_fetch.erl b/src/rebar_fetch.erl index 088a49a..964ccb3 100644 --- a/src/rebar_fetch.erl +++ b/src/rebar_fetch.erl @@ -46,7 +46,12 @@ 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]), - true = code:add_patha(filename:join(AppDir1, "ebin")), + case ec_file:exists(filename:join(AppDir1, "ebin")) of + true -> + true = code:add_patha(filename:join(AppDir1, "ebin")); + false -> + ok + end, true end catch |