summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_shell.erl15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/rebar_prv_shell.erl b/src/rebar_prv_shell.erl
index 9ecadf4..74e2386 100644
--- a/src/rebar_prv_shell.erl
+++ b/src/rebar_prv_shell.erl
@@ -129,7 +129,7 @@ reread_config(State) ->
end.
maybe_boot_apps(State) ->
- case rebar_state:get(State, shell_apps, undefined) of
+ case find_apps_to_boot(State) of
undefined ->
%% try to read in sys.config file
ok = reread_config(State);
@@ -140,6 +140,19 @@ maybe_boot_apps(State) ->
boot_apps(Apps)
end.
+find_apps_to_boot(State) ->
+ %% Try the shell_apps option
+ case rebar_state:get(State, shell_apps, undefined) of
+ undefined ->
+ %% Get to the relx tuple instead
+ case lists:keyfind(release, 1, rebar_state:get(State, relx, [])) of
+ {_, _, Apps} -> Apps;
+ false -> undefined
+ end;
+ Apps ->
+ Apps
+ end.
+
load_apps(Apps) ->
[case application:load(App) of
ok ->