diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2014-06-13 19:25:21 -0500 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2014-06-13 19:25:21 -0500 |
commit | 9380583f6c27b30e1e2a5aa16d681f2e1b6c00c3 (patch) | |
tree | d596d93c56aa8304df89ce9e60311be98cb949cd /src/rebar_core.erl | |
parent | 3297ffec2c89c6b7135165b4bfaeaeb07167c33c (diff) | |
parent | 9c23dfef72c381d93e3d7843700a2e9949c6e31e (diff) |
Merge pull request #229 from tolbrino/tb-patch-env
Add REBAR to environment before executing hooks
Diffstat (limited to 'src/rebar_core.erl')
-rw-r--r-- | src/rebar_core.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index 3a4f205..212365b 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -496,8 +496,9 @@ run_modules([Module | Rest], Command, Config, File) -> {Module, Error} end. -apply_hooks(Mode, Config, Command, Env) -> +apply_hooks(Mode, Config, Command, Env0) -> Hooks = rebar_config:get_local(Config, Mode, []), + Env = rebar_utils:patch_env(Config, Env0), lists:foreach(fun apply_hook/1, [{Env, Hook} || Hook <- Hooks, element(1, Hook) =:= Command orelse |