diff options
author | Tristan Sloughter <t@crashfast.com> | 2017-05-19 18:10:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-19 18:10:03 -0700 |
commit | 4649de6848529f0fe42f86e9a9d9216c2ed96993 (patch) | |
tree | 16d16fa47ea9f1071d9b6c1cd28216b6b9f002f9 | |
parent | d834aa411bab618d408a47a0fdfa9999ba677750 (diff) | |
parent | 8d1d138a26131eaa23f50149fe09c472f7c8b0b3 (diff) |
Merge pull request #1520 from lrascao/feature/relx_warnings_as_errors
Let relx know about application erl opts
-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} |