Projects
Mega:24.03
erlang-rebar
_service:tar_scm:rebar-0001-Load-templates-from...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:rebar-0001-Load-templates-from-the-filesystem-first.patch of Package erlang-rebar
From: Peter Lemenkov <lemenkov@gmail.com> Date: Mon, 4 Mar 2013 19:03:03 +0400 Subject: [PATCH] Load templates from the filesystem first. Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl index 085ac1c..7e8554e 100644 --- a/src/rebar_templater.erl +++ b/src/rebar_templater.erl @@ -241,12 +241,13 @@ find_escript_templates(Files) -> re:run(Name, ?TEMPLATE_RE, [{capture, none}]) == match]. find_disk_templates(Config) -> + BaseTemplates = rebar_utils:find_files(code:priv_dir(rebar) ++ "/templates", ?TEMPLATE_RE), OtherTemplates = find_other_templates(Config), HomeTemplates = filename:join([os:getenv("HOME"), ".rebar", "templates"]), HomeFiles = rebar_utils:find_files_by_ext(HomeTemplates, ".template"), Recursive = rebar_config:is_recursive(Config), LocalFiles = rebar_utils:find_files_by_ext(".", ".template", Recursive), - [{file, F} || F <- OtherTemplates ++ HomeFiles ++ LocalFiles]. + [{file, F} || F <- BaseTemplates ++ OtherTemplates ++ HomeFiles ++ LocalFiles]. find_other_templates(Config) -> case rebar_config:get_global(Config, template_dir, undefined) of
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2