From 9bb677ed9963ea54096d7223e935cda3b7cebac7 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Fri, 14 Feb 2014 21:12:02 +0100 Subject: 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'. --- src/rebar_templater.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -> -- cgit v1.1