summaryrefslogtreecommitdiff
path: root/src/rebar3.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2018-10-15 11:56:57 -0400
committerGitHub <noreply@github.com>2018-10-15 11:56:57 -0400
commit7bfc8110d1736d2cbf61e19d2fc16dc8e854b460 (patch)
tree91f6606ad1083eea8e57fcc46821454180b50c94 /src/rebar3.erl
parent86519cf743204eab1d922ca8133fbf00c66f9ee8 (diff)
parentfb6de6e0e5dc0da1c4e64c166bcb69327420cb60 (diff)
Merge pull request #1907 from ferd/refactor-env-paths
Refactor env path handling and fix some bugs related to it
Diffstat (limited to 'src/rebar3.erl')
-rw-r--r--src/rebar3.erl15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/rebar3.erl b/src/rebar3.erl
index c931a85..059d530 100644
--- a/src/rebar3.erl
+++ b/src/rebar3.erl
@@ -175,7 +175,20 @@ run_aux(State, RawArgs) ->
State10 = rebar_state:code_paths(State9, default, code:get_path()),
- rebar_core:init_command(rebar_state:command_args(State10, Args), Task).
+ case rebar_core:init_command(rebar_state:command_args(State10, Args), Task) of
+ {ok, State11} ->
+ case rebar_state:get(State11, caller, command_line) of
+ api ->
+ rebar_paths:unset_paths([deps, plugins], State11),
+ {ok, State11};
+ _ ->
+ {ok, State11}
+ end;
+ Other ->
+ Other
+ end.
+
+
%% @doc set up base configuration having to do with verbosity, where
%% to find config files, and so on, and return an internal rebar3 state term.