diff options
author | Bryan McLellan <btm@loftninjas.org> | 2020-03-18 13:08:28 -0400 |
---|---|---|
committer | Bryan McLellan <btm@loftninjas.org> | 2020-03-23 12:57:09 -0400 |
commit | ea801d898ba2a7a6e9bee6202710fab28ebf9e9a (patch) | |
tree | 3ef5c4783cc7df2211b3765d32d8a48b2529e5d2 /lib/chef | |
parent | f8545babece542e9741d810bbbbebfcb3491bf64 (diff) | |
download | chef-ea801d898ba2a7a6e9bee6202710fab28ebf9e9a.tar.gz |
Add missing yaml require to Chef::Recipe
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/recipe.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/recipe.rb b/lib/chef/recipe.rb index 936b1ac9d7..890edc6d13 100644 --- a/lib/chef/recipe.rb +++ b/lib/chef/recipe.rb @@ -17,6 +17,7 @@ # limitations under the License. # +require "yaml" require_relative "dsl/recipe" require_relative "mixin/from_file" require_relative "mixin/deprecation" @@ -89,7 +90,7 @@ class Chef self.source_file = filename if File.file?(filename) && File.readable?(filename) yaml_contents = IO.read(filename) - if YAML.load_stream(yaml_contents).length > 1 + if ::YAML.load_stream(yaml_contents).length > 1 raise ArgumentError, "YAML recipe '#{filename}' contains multiple documents, only one is supported" end |