diff options
author | Andrea Campi <andrea.campi@zephirworks.com> | 2012-11-18 23:38:18 +0100 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2012-12-14 11:10:28 -0800 |
commit | b8cd17a7e9a2f5e9738400b96df478bab093c7e7 (patch) | |
tree | 0ef1686aab19958765ef0242088b74eb9675880d /lib/chef/provider/template_finder.rb | |
parent | 77dda3749fb48f0ac4ee3693e21ca0b453c0bbd1 (diff) | |
download | chef-b8cd17a7e9a2f5e9738400b96df478bab093c7e7.tar.gz |
[CHEF-3249] Accept an optional 'source' option to override the actual path to the partial.
This is mostly for uniformity with the template resource.
Diffstat (limited to 'lib/chef/provider/template_finder.rb')
-rw-r--r-- | lib/chef/provider/template_finder.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/provider/template_finder.rb b/lib/chef/provider/template_finder.rb index d64839fa62..3c402f6aae 100644 --- a/lib/chef/provider/template_finder.rb +++ b/lib/chef/provider/template_finder.rb @@ -28,7 +28,9 @@ class Chef end def find(template_name, options = {}) - return template_name if options[:local] + if options[:local] + return options[:source] ? options[:source] : template_name + end cookbook_name = options[:cookbook] ? options[:cookbook] : @cookbook_name |