From d72812cb5f0b7618c3c3678b6a4f357752a5bcac Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Tue, 3 Mar 2015 11:54:59 -0800 Subject: name profile directories in `_build` similarly to the arguments to `as` used to generate them --- src/rebar_dir.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rebar_dir.erl b/src/rebar_dir.erl index fd80fa7..628ebd3 100644 --- a/src/rebar_dir.erl +++ b/src/rebar_dir.erl @@ -23,7 +23,12 @@ -spec base_dir(rebar_state:t()) -> file:filename_all(). base_dir(State) -> Profiles = rebar_state:current_profiles(State), - ProfilesStrings = [ec_cnv:to_list(P) || P <- Profiles], + ProfilesStrings = case [ec_cnv:to_list(P) || P <- Profiles] of + ["default"] -> ["default"]; + %% drop `default` from the profile dir if it's implicit and reverse order + %% of profiles to match order passed to `as` + ["default"|Rest] -> lists:reverse(Rest) + end, ProfilesDir = string:join(ProfilesStrings, "+"), filename:join(rebar_state:get(State, base_dir, ?DEFAULT_BASE_DIR), ProfilesDir). -- cgit v1.1