diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_install_deps.erl | 13 | ||||
-rw-r--r-- | src/rebar_state.erl | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl index 9a3703c..692beaf 100644 --- a/src/rebar_prv_install_deps.erl +++ b/src/rebar_prv_install_deps.erl @@ -65,15 +65,16 @@ init(State) -> -spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}. do(State) -> - ?INFO("Verifying dependencies...", []), Profile = rebar_state:current_profile(State), + ?INFO("Verifying ~p dependencies...", [Profile]), ProjectApps = rebar_state:project_apps(State), try - {ok, SrcApps, State1} = case rebar_state:get(State, locks, []) of - [] -> - handle_deps(State, rebar_state:get(State, {deps, Profile}, [])); - Locks -> - handle_deps(State, Locks) + {ok, SrcApps, State1} = case {Profile, rebar_state:get(State, locks, [])} of + {default, Locks} -> + handle_deps(State, Locks); + _ -> + %% If not the default profile, ignore locks file + handle_deps(State, rebar_state:get(State, {deps, Profile}, [])) end, Source = ProjectApps ++ SrcApps, diff --git a/src/rebar_state.erl b/src/rebar_state.erl index 1f522ef..7cdfd9a 100644 --- a/src/rebar_state.erl +++ b/src/rebar_state.erl @@ -160,8 +160,6 @@ apply_profile(State=#state_t{default=Opts}, Profile) -> State#state_t{opts=merge_opts(Profile, ProfileOpts, Opts1)}. merge_opts(Profile, NewOpts, OldOpts) -> - io:format("Keys ~p~n", [dict:fetch_keys(NewOpts)]), - io:format("Keys ~p~n", [dict:fetch_keys(OldOpts)]), Dict = dict:merge(fun(_Key, NewValue, OldValue) when is_list(NewValue) -> case io_lib:printable_list(NewValue) of true -> @@ -177,7 +175,7 @@ merge_opts(Profile, NewOpts, OldOpts) -> case dict:find(deps, NewOpts) of error -> dict:store({deps, Profile}, [], Dict); - Deps -> + {ok, Deps} -> dict:store({deps, Profile}, Deps, Dict) end. |