diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-07-11 17:41:58 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-07-11 17:41:58 -0400 |
commit | 3ef93babc1e0a6e84deda08ff48fea909084840d (patch) | |
tree | 9e0b6431debe7f6136b42235977bff08793d1c89 /src | |
parent | 83fa49ed3c478aa8dcc968d07d8852e247c98ca9 (diff) | |
parent | a67ce27ac17234aae720ec159ef6eb733a30f716 (diff) |
Merge pull request #609 from tsloughter/global_plugin_bug
Global plugin bug
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_state.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rebar_state.erl b/src/rebar_state.erl index d0b28de..1e0abc5 100644 --- a/src/rebar_state.erl +++ b/src/rebar_state.erl @@ -289,7 +289,16 @@ apply_profiles(State, Profile) when not is_list(Profile) -> apply_profiles(State, [default]) -> State; apply_profiles(State=#state_t{default = Defaults, current_profiles=CurrentProfiles}, Profiles) -> - AppliedProfiles = deduplicate(CurrentProfiles ++ Profiles), + AppliedProfiles = case Profiles of + %% Head of list global profile is special, only for use by rebar3 + %% It does not clash if a user does `rebar3 as global...` but when + %% it is the head we must make sure not to prepend `default` + [global | _] -> + Profiles; + _ -> + deduplicate(CurrentProfiles ++ Profiles) + end, + ConfigProfiles = rebar_state:get(State, profiles, []), NewOpts = |