From ba538094bafe568031c505ffe88d683945cdecd2 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 3 Jan 2012 18:57:34 +0100 Subject: [PATCH] Extend rebar_utils:deprecated --- src/rebar_utils.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 113dd21..199acdf 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -247,12 +247,19 @@ get_deprecated_global(OldOpt, NewOpt, When) -> New end. -deprecated(Old, New, Opts, When) -> +deprecated(Old, New, Opts, When) when is_list(Opts) -> case lists:member(Old, Opts) of true -> deprecated(Old, New, When); false -> ok + end; +deprecated(Old, New, Config, When) -> + case rebar_config:get(Config, Old, undefined) of + undefined -> + ok; + _ -> + deprecated(Old, New, When) end. deprecated(Old, New, When) ->