Browse Source

Fix #226

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'.
pull/3/head
Tuncer Ayaz 11 years ago
committed by Jared Morrow
parent
commit
9bb677ed99
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/rebar_templater.erl

+ 2
- 1
src/rebar_templater.erl 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) ->

Loading…
Cancel
Save