summaryrefslogtreecommitdiff
path: root/src/rebar_prv_shell.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2016-01-17 11:38:39 -0600
committerTristan Sloughter <t@crashfast.com>2016-01-17 11:38:39 -0600
commit10948be896e71f9f461c602e3bd81c989a9411d7 (patch)
tree8a476b53f5cb61576bf9a08afd16c6e5e7907eb1 /src/rebar_prv_shell.erl
parentc8e0b1c5ce1b434850d34e50945f724c25e7df1b (diff)
parent50307a6aa995437228cc5c98f4270e95efb90a3f (diff)
Merge pull request #1022 from ferd/badconfig-shell-error
Display error message when bad config is loaded
Diffstat (limited to 'src/rebar_prv_shell.erl')
-rw-r--r--src/rebar_prv_shell.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rebar_prv_shell.erl b/src/rebar_prv_shell.erl
index 824293f..ea759fc 100644
--- a/src/rebar_prv_shell.erl
+++ b/src/rebar_prv_shell.erl
@@ -325,9 +325,14 @@ reread_config(State) ->
no_config ->
ok;
ConfigList ->
- _ = [application:set_env(Application, Key, Val)
+ try
+ [application:set_env(Application, Key, Val)
|| {Application, Items} <- ConfigList,
- {Key, Val} <- Items],
+ {Key, Val} <- Items]
+ catch _:_ ->
+ ?ERROR("The configuration file submitted could not be read "
+ "and will be ignored.", [])
+ end,
ok
end.