summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2014-11-23 19:06:43 +0000
committerFred Hebert <mononcqc@ferd.ca>2014-11-23 19:06:43 +0000
commit45ac9eb94db65e175ea943e1c70c3d466da2e3e5 (patch)
tree83a7a470d92360e903c10bc603fd49f6b36a043b
parent38f40f2cc25d10bde2c7178ba500a127687da0ec (diff)
Drop search for templates in cwd
Templates should only be in ~/.rebar3/templates and the built-in ones, bar some specific overrides someone may want. Looking recursively for templates in the CWD (.) may end up searching nearly forever if the project is being created at the top of a very deep directory tree, with extremely unlikely chances to find relevant templates. It causes more problems than benefits.
-rw-r--r--src/rebar_templater.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl
index 4d871cd..f4cf3d2 100644
--- a/src/rebar_templater.erl
+++ b/src/rebar_templater.erl
@@ -273,8 +273,7 @@ find_disk_templates(State) ->
Home = rebar_utils:home_dir(),
HomeFiles = rebar_utils:find_files(filename:join([Home, ?CONFIG_DIR, "templates"]),
?TEMPLATE_RE),
- LocalFiles = rebar_utils:find_files(".", ?TEMPLATE_RE, true),
- [{file, F} || F <- OtherTemplates ++ HomeFiles ++ LocalFiles].
+ [{file, F} || F <- OtherTemplates ++ HomeFiles].
%% Fetch template indexes that sit on disk in custom areas
find_other_templates(State) ->