summaryrefslogtreecommitdiff
path: root/lib/chef/role.rb
diff options
context:
space:
mode:
authorBertrand Paquet <bpaquet@octo.com>2013-10-02 22:01:36 +0200
committerBryan McLellan <btm@opscode.com>2013-10-10 11:29:24 -0700
commit0a9b4e846408f56d7cd53709700137e82e93fcab (patch)
tree23cb7ae2338a5ebfa3672261fdbb7d011bcd053f /lib/chef/role.rb
parentca716484915abf9a3220d898e458531151130910 (diff)
downloadchef-0a9b4e846408f56d7cd53709700137e82e93fcab.tar.gz
Apply comments from @btm
Diffstat (limited to 'lib/chef/role.rb')
-rw-r--r--lib/chef/role.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/role.rb b/lib/chef/role.rb
index 124acdfaf0..6ad58b816d 100644
--- a/lib/chef/role.rb
+++ b/lib/chef/role.rb
@@ -233,8 +233,7 @@ class Chef
# Load a role from disk - prefers to load the JSON, but will happily load
# the raw rb files as well.
def self.from_disk(name, force=nil)
- paths = Chef::Config[:role_path]
- paths = [paths] if paths.is_a? String
+ paths = Array(Chef::Config[:role_path])
paths.each do |p|
js_file = File.join(p, "#{name}.json")