mirror of
https://github.com/correl/rebar.git
synced 2025-01-05 11:08:16 +00:00
Fix error handling bug in {copy,In,Out} template
This commit is contained in:
parent
d9ef6fbd53
commit
edf4bbc370
1 changed files with 4 additions and 4 deletions
|
@ -362,13 +362,13 @@ execute_template([{dir, Name} | Rest], TemplateType, TemplateName, Context,
|
||||||
execute_template([{copy, Input, Output} | Rest], TemplateType, TemplateName,
|
execute_template([{copy, Input, Output} | Rest], TemplateType, TemplateName,
|
||||||
Context, Force, ExistingFiles) ->
|
Context, Force, ExistingFiles) ->
|
||||||
InputName = filename:join(filename:dirname(TemplateName), Input),
|
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 ->
|
ok ->
|
||||||
execute_template(Rest, TemplateType, TemplateName,
|
execute_template(Rest, TemplateType, TemplateName,
|
||||||
Context, Force, ExistingFiles);
|
Context, Force, ExistingFiles)
|
||||||
{error, Reason} ->
|
catch _:_ ->
|
||||||
?ABORT("Failed while processing template instruction "
|
?ABORT("Failed while processing template instruction "
|
||||||
"{dir, ~s, ~s}: ~p\n", [Input, Output, Reason])
|
"{dir, ~s, ~s}~n", [Input, Output])
|
||||||
end;
|
end;
|
||||||
execute_template([{chmod, Mod, File} | Rest], TemplateType, TemplateName,
|
execute_template([{chmod, Mod, File} | Rest], TemplateType, TemplateName,
|
||||||
Context, Force, ExistingFiles) when is_integer(Mod) ->
|
Context, Force, ExistingFiles) when is_integer(Mod) ->
|
||||||
|
|
Loading…
Reference in a new issue