diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-05-21 11:19:12 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-05-21 11:19:12 -0400 |
commit | d91c37ed5cee67a44cc95b4a9e54e6e8582818a9 (patch) | |
tree | 935c93b9ace60640448b100cff01580bfbd2a9a9 /src | |
parent | ab1d2645576442309b69233c8bf82824f2c6cdbd (diff) | |
parent | efd2445c7424d118a4cef3b3db6c5e323ede2484 (diff) |
Merge pull request #443 from kovyl2404/singleapp-project-duplicated-hook
Run hooks for single application only once.
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_app_discover.erl | 4 | ||||
-rw-r--r-- | src/rebar_prv_compile.erl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl index 73401bc..4eda199 100644 --- a/src/rebar_app_discover.erl +++ b/src/rebar_app_discover.erl @@ -65,10 +65,10 @@ project_app_config(AppInfo, State) -> %% Here we check if the app is at the root of the project. %% If it is, then drop the hooks from the config so they aren't run twice maybe_reset_hooks(C, Dir, State) -> - case filename:dirname(rebar_dir:root_dir(State)) of + case ec_file:real_dir_path(rebar_dir:root_dir(State)) of Dir -> C1 = proplists:delete(provider_hooks, C), - proplists:delete(hooks, C1); + proplists:delete(post_hooks, proplists:delete(pre_hooks, C1)); _ -> C end. diff --git a/src/rebar_prv_compile.erl b/src/rebar_prv_compile.erl index b80d90c..1dff4d8 100644 --- a/src/rebar_prv_compile.erl +++ b/src/rebar_prv_compile.erl @@ -37,7 +37,7 @@ do(State) -> ProjectApps = rebar_state:project_apps(State), Providers = rebar_state:providers(State), Deps = rebar_state:deps_to_build(State), - Cwd = rebar_dir:get_cwd(), + Cwd = rebar_state:dir(State), %% Need to allow global config vars used on deps %% Right now no way to differeniate and just give deps a new state |