summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuilherme Andrade <g@gandrade.net>2019-09-01 23:45:51 +0100
committerGuilherme Andrade <g@gandrade.net>2019-09-01 23:46:59 +0100
commit8412c684f9b4a33c18c234c1b4c7d50185e66971 (patch)
treee45f5964c8aad1d3f0f3d3958d449439e26590d5 /src
parent7bbc4678597b9a95156ec15bd78af2e794112e85 (diff)
Don't export internal function definition
Diffstat (limited to 'src')
-rw-r--r--src/rebar_dir.erl13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rebar_dir.erl b/src/rebar_dir.erl
index 8cdf196..54e910d 100644
--- a/src/rebar_dir.erl
+++ b/src/rebar_dir.erl
@@ -47,13 +47,16 @@ profile_dir(Opts, Profiles) ->
[global | _] -> ?MODULE:global_cache_dir(Opts);
[_|_] -> rebar_opts:get(Opts, base_dir, ?DEFAULT_BASE_DIR)
end,
- DirName = profile_dir_name(Profiles),
+ DirName = profile_dir_name_(Profiles),
filename:join(BasePath, DirName).
%% @doc returns the directory name for build artifacts for a given set
%% of profiles.
--spec profile_dir_name([atom(), ...] | rebar_state:t()) -> file:filename_all().
-profile_dir_name(Profiles)
+profile_dir_name(State) ->
+ profile_dir_name_(rebar_state:current_profiles(State)).
+
+-spec profile_dir_name_([atom(), ...] | rebar_state:t()) -> file:filename_all().
+profile_dir_name_(Profiles)
when is_list(Profiles) ->
case [rebar_utils:to_list(P) || P <- Profiles] of
["global" | _] -> "";
@@ -62,9 +65,7 @@ profile_dir_name(Profiles)
%% drop `default' from the profile dir if it's implicit and reverse order
%% of profiles to match order passed to `as`
["default"|NonDefaultNames] -> rebar_string:join(NonDefaultNames, "+")
- end;
-profile_dir_name(State) ->
- profile_dir_name(rebar_state:current_profiles(State)).
+ end.
%% @doc returns the directory where dependencies should be placed
%% given the current profile.