diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2017-11-02 12:52:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-02 12:52:55 -0400 |
commit | a1b1df4ac9ec1e51fac6a81dc80fa87a39316912 (patch) | |
tree | 8dcf23da9d018bb3337114e9fc10edd3b618f24d | |
parent | 1f81293ef1a24c6091c02cc4055a58aab8e7be5a (diff) | |
parent | e57c8b74274cc43cc23ca0f4f76dd18f70a9241d (diff) |
Merge pull request #1650 from ferd/prevent-crash-on-dup-plugin-paths
Prevent hard crash on duplicate plugin paths
-rw-r--r-- | src/rebar_core.erl | 1 | ||||
-rw-r--r-- | src/rebar_utils.erl | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 3ef7a0d..6132a5e 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -136,6 +136,7 @@ process_command(State, Command) -> do([], State) -> {ok, State}; do([ProviderName | Rest], State) -> + ?DEBUG("Provider: ~p", [ProviderName]), %% Special providers like 'as', 'do' or some hooks may be passed %% as a tuple {Namespace, Name}, otherwise not. Handle them %% on a per-need basis. diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 016847e..ee8f179 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -766,7 +766,7 @@ remove_from_code_path(Paths) -> [begin code:purge(M), code:delete(M) end || M <- Modules] end, code:del_path(Path) - end, Paths). + end, lists:usort(Paths)). %% @doc Revert to only having the beams necessary for running rebar3 and %% plugins in the path |