Skip to content

Commit f387b89

Browse files
authored
Fix clean hooks mechanism
As mentioned in erlang/rebar3#2863, fixing the `clean` hooks appears to have fixed their count by properly assigning them in the top-level app in a non-umbrella project. See how [the multi app file](https://github.com/tsloughter/rebar3_tests/blob/cba67afa851747bcdb5294c9d88c697f0d814b3c/multi_app_hooks/multi_app_hooks.test#L5) has a single `CLEAN!` hook but [the single app one had two for clean](https://github.com/tsloughter/rebar3_tests/blob/cba67afa851747bcdb5294c9d88c697f0d814b3c/single_app_hooks/single_app_hooks.test#L5-L6) while [having a single one for compile](https://github.com/tsloughter/rebar3_tests/blob/cba67afa851747bcdb5294c9d88c697f0d814b3c/single_app_hooks/single_app_hooks.test#L14). This is because the discovery step we weren't doing right before the PR meant that the hook was assigned both to the project and the individual app. By fixing the detection and overrides, the hook is properly assigned to the app in a single-app project, and to the project root when in an umbrella. This PR prepares tests to pass once the rebar3 one is merged.
1 parent cba67af commit f387b89

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

single_app_hooks/single_app_hooks.test

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ TERM=dumb rebar3 clean
33
===> Verifying dependencies...
44
===> Cleaning out single_app_hooks...
55
CLEAN!
6-
CLEAN!
76
>>>= 0
87

98
TERM=dumb rebar3 compile
@@ -12,4 +11,4 @@ TERM=dumb rebar3 compile
1211
===> Analyzing applications...
1312
===> Compiling single_app_hooks
1413
COMPILE!
15-
>>>= 0
14+
>>>= 0

0 commit comments

Comments
 (0)