diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_install_deps.erl | 4 | ||||
-rw-r--r-- | src/rebar_prv_lock.erl | 3 | ||||
-rw-r--r-- | src/rebar_prv_update.erl | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl index 38bd110..75bcf0c 100644 --- a/src/rebar_prv_install_deps.erl +++ b/src/rebar_prv_install_deps.erl @@ -57,7 +57,7 @@ init(State) -> provider_impl = ?MODULE, bare = false, deps = ?DEPS, - example = "", + example = undefined, short_desc = "Install dependencies", desc = info("Install dependencies"), opts = []}), @@ -90,7 +90,6 @@ setup_env(State) -> end, [{"REBAR_DEPS_DIR", DepsDir}, ERL_LIBS]. - -spec get_deps_dir(rebar_state:t()) -> file:filename_all(). get_deps_dir(State) -> BaseDir = rebar_state:get(State, base_dir, ""), @@ -126,7 +125,6 @@ handle_deps(State, Deps) -> BinaryDeps1 -> %% Find binary deps needed {ok, S} = rlx_depsolver:solve(Graph, BinaryDeps1), - %% Create app_info record for each binary dep lists:map(fun({Name, Vsn}) -> AppInfo = package_to_app(DepsDir diff --git a/src/rebar_prv_lock.erl b/src/rebar_prv_lock.erl index 8edfc9a..db6e753 100644 --- a/src/rebar_prv_lock.erl +++ b/src/rebar_prv_lock.erl @@ -33,6 +33,9 @@ do(State) -> AllDeps = rebar_state:get(State, all_deps, []), Locks = lists:map(fun(Dep) -> Dir = rebar_app_info:dir(Dep), + + %% If source is tuple it is a source dep + %% e.g. {git, "git://github.com/ninenines/cowboy.git", "master"} case rebar_app_info:source(Dep) of Source when is_tuple(Source) -> {rebar_app_info:name(Dep) diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl index d413af2..527c582 100644 --- a/src/rebar_prv_update.erl +++ b/src/rebar_prv_update.erl @@ -48,6 +48,7 @@ do(State) -> [] -> ?INFO("Updating package index...~n", []), Url = url(State), + %{ok, [Home]} = init:get_argument(home), ec_file:mkdir_p(filename:join([os:getenv("HOME"), ".rebar"])), PackagesFile = filename:join([os:getenv("HOME"), ".rebar", "packages"]), {ok, RequestId} = httpc:request(get, {Url, []}, [], [{stream, PackagesFile}, {sync, false}]), |