mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
look for templates in local directory as well
This commit is contained in:
parent
2734f2bcc2
commit
4e01b32d5d
1 changed files with 3 additions and 2 deletions
|
@ -127,8 +127,9 @@ find_escript_templates() ->
|
|||
re:run(Name, ?TEMPLATE_RE, [{capture, none}]) == match].
|
||||
|
||||
find_disk_templates() ->
|
||||
Files = rebar_utils:find_files(filename:join(os:getenv("HOME"), ".rebar/templates"), ?TEMPLATE_RE),
|
||||
[{file, F} || F <- Files].
|
||||
HomeFiles = rebar_utils:find_files(filename:join(os:getenv("HOME"), ".rebar/templates"), ?TEMPLATE_RE),
|
||||
LocalFiles = rebar_utils:find_files(".", ?TEMPLATE_RE),
|
||||
[{file, F} || F <- HomeFiles++LocalFiles].
|
||||
|
||||
select_template([], Template) ->
|
||||
?ABORT("Template ~s not found.\n", [Template]);
|
||||
|
|
Loading…
Reference in a new issue