diff options
author | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2015-03-03 11:54:59 -0800 |
---|---|---|
committer | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2015-03-03 11:54:59 -0800 |
commit | d72812cb5f0b7618c3c3678b6a4f357752a5bcac (patch) | |
tree | 94ec5f938794901f461f56b569ddb7baefbb691c /src | |
parent | 08ee1d9f9fefb534154252f395ec97a870cbf321 (diff) |
name profile directories in `_build` similarly to the arguments
to `as` used to generate them
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_dir.erl | 7 |
1 files changed, 6 insertions, 1 deletions
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). |