summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2011-07-18 18:52:32 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2011-07-18 18:58:20 +0200
commitedf4bbc3700dbed4eccf4b1664026f7879581466 (patch)
treeff5ff0d2e1683f949b7e6a7b461cd42da8762781 /src
parentd9ef6fbd536225482fefef7838eec5fc2520c08e (diff)
Fix error handling bug in {copy,In,Out} template
Diffstat (limited to 'src')
-rw-r--r--src/rebar_templater.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl
index 865c8d5..5fe427b 100644
--- a/src/rebar_templater.erl
+++ b/src/rebar_templater.erl
@@ -362,13 +362,13 @@ execute_template([{dir, Name} | Rest], TemplateType, TemplateName, Context,
execute_template([{copy, Input, Output} | Rest], TemplateType, TemplateName,
Context, Force, ExistingFiles) ->
InputName = filename:join(filename:dirname(TemplateName), Input),
- case rebar_file_utils:cp_r([InputName ++ "/*"], Output) of
+ try rebar_file_utils:cp_r([InputName ++ "/*"], Output) of
ok ->
execute_template(Rest, TemplateType, TemplateName,
- Context, Force, ExistingFiles);
- {error, Reason} ->
+ Context, Force, ExistingFiles)
+ catch _:_ ->
?ABORT("Failed while processing template instruction "
- "{dir, ~s, ~s}: ~p\n", [Input, Output, Reason])
+ "{dir, ~s, ~s}~n", [Input, Output])
end;
execute_template([{chmod, Mod, File} | Rest], TemplateType, TemplateName,
Context, Force, ExistingFiles) when is_integer(Mod) ->