summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_templater.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl
index bca817f..279c53d 100644
--- a/src/rebar_templater.erl
+++ b/src/rebar_templater.erl
@@ -385,10 +385,11 @@ execute_template(Files, [{'if', Cond, True, False} | Rest], TemplateType,
execute_template(Files, prepend_instructions(Instructions, Rest),
TemplateType, TemplateName, Context, Force,
ExistingFiles);
-execute_template(Files, [{'case', Variable, Value, Instructions} | Rest], TemplateType,
+execute_template(Files, [{'case', Variable, Values, Instructions} | Rest], TemplateType,
TemplateName, Context, Force, ExistingFiles) ->
- Instructions2 = case dict:find(Variable, Context) of
- {ok, Value} ->
+ {ok, Value} = dict:find(Variable, Context),
+ Instructions2 = case lists:member(Value, Values) of
+ true ->
Instructions;
_ ->
[]