diff options
author | Luis Rascao <luis.rascao@gmail.com> | 2017-03-23 00:40:58 +0000 |
---|---|---|
committer | Luis Rascao <luis.rascao@gmail.com> | 2017-05-15 15:46:31 +0100 |
commit | 8d1d138a26131eaa23f50149fe09c472f7c8b0b3 (patch) | |
tree | 09335e0ee75a18498501be92b8f539f95507b3c4 /src | |
parent | 50d5f3fafe55d7e3a0923f7ec7162c19ad3a8654 (diff) |
Let relx know about application erl opts
This is so that some of them can be enforced
(such as warnings_as_errors) on relx's task like
generating a release or a release upgrade.
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_relx.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rebar_relx.erl b/src/rebar_relx.erl index 5c653a3..abfb8fc 100644 --- a/src/rebar_relx.erl +++ b/src/rebar_relx.erl @@ -26,19 +26,21 @@ do(Module, Command, Provider, State) -> AllOptions = string:join([Command | Options], " "), Cwd = rebar_state:dir(State), Providers = rebar_state:providers(State), + RebarOpts = rebar_state:opts(State), + ErlOpts = rebar_opts:erl_opts(RebarOpts), rebar_hooks:run_project_and_app_hooks(Cwd, pre, Provider, Providers, State), try case rebar_state:get(State, relx, []) of [] -> relx:main([{lib_dirs, LibDirs} ,{caller, api} - ,{log_level, LogLevel} | output_dir(OutputDir, Options)], AllOptions); + ,{log_level, LogLevel} | output_dir(OutputDir, Options)] ++ ErlOpts, AllOptions); Config -> Config1 = merge_overlays(Config), relx:main([{lib_dirs, LibDirs} ,{config, Config1} ,{caller, api} - ,{log_level, LogLevel} | output_dir(OutputDir, Options)], AllOptions) + ,{log_level, LogLevel} | output_dir(OutputDir, Options)] ++ ErlOpts, AllOptions) end, rebar_hooks:run_project_and_app_hooks(Cwd, post, Provider, Providers, State), {ok, State} |