Running 'rebar list-templates' can take quite a long time, when it has
to search the file system. To fix that, make list-templates not recurse
by default. To enable recursion, run 'rebar -r list-templates'.
This commit is contained in:
Tuncer Ayaz 2014-02-14 21:12:02 +01:00 committed by Jared Morrow
parent 77a0eb6fe4
commit 9bb677ed99

View file

@ -245,7 +245,8 @@ find_disk_templates(Config) ->
HomeFiles = rebar_utils:find_files(filename:join([os:getenv("HOME"),
".rebar", "templates"]),
?TEMPLATE_RE),
LocalFiles = rebar_utils:find_files(".", ?TEMPLATE_RE),
Recursive = rebar_config:is_recursive(Config),
LocalFiles = rebar_utils:find_files(".", ?TEMPLATE_RE, Recursive),
[{file, F} || F <- OtherTemplates ++ HomeFiles ++ LocalFiles].
find_other_templates(Config) ->