diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2014-02-14 21:12:02 +0100 |
---|---|---|
committer | Jared Morrow <jared@basho.com> | 2014-03-11 21:11:36 +0000 |
commit | 9bb677ed9963ea54096d7223e935cda3b7cebac7 (patch) | |
tree | 61ce6265ea035f51efdff3a983993dcaeb3b8a54 | |
parent | 77a0eb6fe4dca909c6fe63f00b6793ba759f1a63 (diff) |
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'.
-rw-r--r-- | src/rebar_templater.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl index 43bb8da..fef4627 100644 --- a/src/rebar_templater.erl +++ b/src/rebar_templater.erl @@ -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) -> |