diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-05-22 08:31:28 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-05-22 08:31:28 -0400 |
commit | 53552d3f77d5b34e7c1dc7a61348c254b5001b30 (patch) | |
tree | 318efaac6db6f58475ca92f17c535c22934cc155 /src | |
parent | 69ae48e8f15f0142bcd12645171571d8c5210fb5 (diff) | |
parent | 42339f62f3e7bad759d595a08ac4583a5faad30d (diff) |
Merge pull request #466 from tsloughter/clean_hooks
only run clean hooks once
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_clean.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rebar_prv_clean.erl b/src/rebar_prv_clean.erl index 8fafe23..272ac26 100644 --- a/src/rebar_prv_clean.erl +++ b/src/rebar_prv_clean.erl @@ -67,8 +67,13 @@ format_error(Reason) -> clean_apps(State, Providers, Apps) -> lists:foreach(fun(AppInfo) -> AppDir = rebar_app_info:dir(AppInfo), - C = rebar_config:consult(AppDir), - S = rebar_state:new(State, C, AppDir), + S = case rebar_app_info:state(AppInfo) of + undefined -> + C = rebar_config:consult(AppDir), + rebar_state:new(State, C, AppDir); + AppState -> + AppState + end, ?INFO("Cleaning out ~s...", [rebar_app_info:name(AppInfo)]), %% Legacy hook support |