Преглед на файлове

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.
pull/19/head
Fred Hebert преди 10 години
родител
ревизия
45ac9eb94d
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. +1
    -2
      src/rebar_templater.erl

+ 1
- 2
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) ->

Зареждане…
Отказ
Запис