diff options
author | Bryan Fink <bryan@basho.com> | 2010-02-04 14:30:10 -0500 |
---|---|---|
committer | Bryan Fink <bryan@basho.com> | 2010-02-04 14:30:10 -0500 |
commit | 4e01b32d5db959009dbd57d6928725e33b8aa7be (patch) | |
tree | bf0da85eb6ca9262028130000dea10b90264711e /src | |
parent | 2734f2bcc2ece0256467bf527c14bf4dab7a7e67 (diff) |
look for templates in local directory as well
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_templater.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl index 4e2e678..8e07694 100644 --- a/src/rebar_templater.erl +++ b/src/rebar_templater.erl @@ -127,8 +127,9 @@ find_escript_templates() -> re:run(Name, ?TEMPLATE_RE, [{capture, none}]) == match]. find_disk_templates() -> - Files = rebar_utils:find_files(filename:join(os:getenv("HOME"), ".rebar/templates"), ?TEMPLATE_RE), - [{file, F} || F <- Files]. + HomeFiles = rebar_utils:find_files(filename:join(os:getenv("HOME"), ".rebar/templates"), ?TEMPLATE_RE), + LocalFiles = rebar_utils:find_files(".", ?TEMPLATE_RE), + [{file, F} || F <- HomeFiles++LocalFiles]. select_template([], Template) -> ?ABORT("Template ~s not found.\n", [Template]); |