瀏覽代碼

don't lose defualt deps when creating current profile

pull/46/head
Tristan Sloughter 10 年之前
父節點
當前提交
f77cbb7f50
共有 3 個文件被更改,包括 8 次插入1 次删除
  1. +2
    -0
      src/rebar_prv_install_deps.erl
  2. +1
    -1
      src/rebar_prv_tar.erl
  3. +5
    -0
      src/rebar_state.erl

+ 2
- 0
src/rebar_prv_install_deps.erl 查看文件

@ -70,6 +70,8 @@ do(State) ->
ProjectApps = rebar_state:project_apps(State),
try
{ok, SrcApps, State1} = case {Profile, rebar_state:get(State, locks, [])} of
{default, []} ->
handle_deps(State, rebar_state:get(State, {deps, Profile}, []));
{default, Locks} ->
handle_deps(State, Locks);
_ ->

+ 1
- 1
src/rebar_prv_tar.erl 查看文件

@ -12,7 +12,7 @@
-include("rebar.hrl").
-define(PROVIDER, tar).
-define(DEPS, [compile]).
-define(DEPS, [{compile, default}, compile]).
%% ===================================================================
%% Public API

+ 5
- 0
src/rebar_state.erl 查看文件

@ -152,6 +152,10 @@ command_parsed_args(State, CmdArgs) ->
State#state_t{command_parsed_args=CmdArgs}.
%% Only apply profiles to the default profile
apply_profile(State=#state_t{default=Opts}, default) ->
Deps = rebar_state:get(State, deps, []),
Opts1 = dict:store({deps, default}, Deps, Opts),
State#state_t{opts=Opts1};
apply_profile(State=#state_t{default=Opts}, Profile) ->
ConfigProfiles = rebar_state:get(State, profiles, []),
Deps = rebar_state:get(State, deps, []),
@ -172,6 +176,7 @@ merge_opts(Profile, NewOpts, OldOpts) ->
(_Key, NewValue, _OldValue) ->
NewValue
end, NewOpts, OldOpts),
case dict:find(deps, NewOpts) of
error ->
dict:store({deps, Profile}, [], Dict);

Loading…
取消
儲存