aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_prv_overlay.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2014-10-01 08:03:25 -0500
committerTristan Sloughter <[email protected]>2014-10-11 11:13:05 -0500
commite4849bd132b28ba1e1420686aadf8b2136c44fbd (patch)
tree6d37fc2e021e8a860056dbc2cb59361de132bc54 /src/rlx_prv_overlay.erl
parent2604b7f0e9e11ee2fae17816499aba180b9b9683 (diff)
downloadrelx-e4849bd132b28ba1e1420686aadf8b2136c44fbd.tar.gz
relx-e4849bd132b28ba1e1420686aadf8b2136c44fbd.tar.bz2
relx-e4849bd132b28ba1e1420686aadf8b2136c44fbd.zip
support config passed in as proplist instead of filename
Diffstat (limited to 'src/rlx_prv_overlay.erl')
-rw-r--r--src/rlx_prv_overlay.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rlx_prv_overlay.erl b/src/rlx_prv_overlay.erl
index 4cbbf31..f7e2be8 100644
--- a/src/rlx_prv_overlay.erl
+++ b/src/rlx_prv_overlay.erl
@@ -377,7 +377,12 @@ get_relative_root(State) ->
[] ->
rlx_state:root_dir(State);
Config ->
- filename:dirname(Config)
+ case filelib:is_regular(Config) of
+ true ->
+ filename:dirname(Config);
+ false ->
+ rlx_state:root_dir(State)
+ end
end.
-spec is_directory(file:name(), file:name()) -> boolean().