diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-03-03 16:31:38 -0500 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-03-03 16:31:38 -0500 |
commit | 5fb6bc680a153766184f1f4f9f30b5cc9484d98d (patch) | |
tree | dfffe5cd9ee4445a655a0784aa437922bdc07cac /src | |
parent | c43641654fe808dd4e6b49b9a770493db1c4e96b (diff) | |
parent | d72812cb5f0b7618c3c3678b6a4f357752a5bcac (diff) |
Merge pull request #210 from talentdeficit/shorter_build_dirs
shorter build dirs
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). |