summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_deps.erl56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 82c5061..15e7594 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -68,31 +68,6 @@ preprocess(Config, _) ->
%% Add available deps to code path
Config3 = update_deps_code_path(Config2, AvailableDeps),
- %% If skip_deps=true, mark each dep dir as a skip_dir w/ the core so that
- %% the current command doesn't run on the dep dir. However, pre/postprocess
- %% WILL run (and we want it to) for transitivity purposes.
- %%
- %% Also, if skip_deps=comma,separated,app,list, then only the given
- %% dependencies are skipped.
- NewConfig = case rebar_config:get_global(Config3, skip_deps, false) of
- "true" ->
- lists:foldl(
- fun(#dep{dir = Dir}, C) ->
- rebar_config:set_skip_dir(C, Dir)
- end, Config3, AvailableDeps);
- Apps when is_list(Apps) ->
- SkipApps = [list_to_atom(App) || App <- string:tokens(Apps, ",")],
- lists:foldl(
- fun(#dep{dir = Dir, app = App}, C) ->
- case lists:member(App, SkipApps) of
- true -> rebar_config:set_skip_dir(C, Dir);
- false -> C
- end
- end, Config3, AvailableDeps);
- _ ->
- Config3
- end,
-
%% Filtering out 'raw' dependencies so that no commands other than
%% deps-related can be executed on their directories.
NonRawAvailableDeps = [D || D <- AvailableDeps, not D#dep.is_raw],
@@ -103,13 +78,38 @@ preprocess(Config, _) ->
%% any other calls to preprocess() for update-deps beyond the
%% toplevel directory. They aren't actually harmful, but they slow
%% things down unnecessarily.
- NewConfig2 = lists:foldl(fun(D, Acc) ->
+ NewConfig = lists:foldl(fun(D, Acc) ->
rebar_config:set_skip_dir(Acc, D#dep.dir)
- end, NewConfig, collect_deps(rebar_utils:get_cwd(),NewConfig)),
+ end, Config3, collect_deps(rebar_utils:get_cwd(), Config3)),
%% Return the empty list, as we don't want anything processed before
%% us.
- {ok, NewConfig2, []};
+ {ok, NewConfig, []};
_ ->
+ %% If skip_deps=true, mark each dep dir as a skip_dir w/ the core so that
+ %% the current command doesn't run on the dep dir. However, pre/postprocess
+ %% WILL run (and we want it to) for transitivity purposes.
+ %%
+ %% Also, if skip_deps=comma,separated,app,list, then only the given
+ %% dependencies are skipped.
+ NewConfig = case rebar_config:get_global(Config3, skip_deps, false) of
+ "true" ->
+ lists:foldl(
+ fun(#dep{dir = Dir}, C) ->
+ rebar_config:set_skip_dir(C, Dir)
+ end, Config3, AvailableDeps);
+ Apps when is_list(Apps) ->
+ SkipApps = [list_to_atom(App) || App <- string:tokens(Apps, ",")],
+ lists:foldl(
+ fun(#dep{dir = Dir, app = App}, C) ->
+ case lists:member(App, SkipApps) of
+ true -> rebar_config:set_skip_dir(C, Dir);
+ false -> C
+ end
+ end, Config3, AvailableDeps);
+ _ ->
+ Config3
+ end,
+
%% Return all the available dep directories for process
{ok, NewConfig, dep_dirs(NonRawAvailableDeps)}
end.