Skip to content

Commit 574afcb

Browse files
committed
Fix a regression with Chef 10 in Ruby
1 parent afd8dcf commit 574afcb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

recipes/ruby.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Author:: Jesse Howarth (<[email protected]>)
66
# Author:: Jamie Winsor (<[email protected]>)
77
#
8-
# Copyright 2008-2012, Opscode, Inc.
8+
# Copyright 2008-2013, Opscode, Inc.
99
#
1010
# Licensed under the Apache License, Version 2.0 (the "License");
1111
# you may not use this file except in compliance with the License.
@@ -24,7 +24,13 @@
2424
include_recipe 'build-essential::default'
2525
include_recipe 'mysql::client'
2626

27-
if run_context.loaded_recipes.include?('mysql::percona_repo')
27+
loaded_recipes = if run_context.respond_to?(:loaded_recipes)
28+
run_context.loaded_recipes
29+
else
30+
run_context.run_state[:seen_recipes]
31+
end
32+
33+
if loaded_recipes.include?('mysql::percona_repo')
2834
case node['platform_family']
2935
when 'debian'
3036
resources('apt_repository[percona]').run_action(:add)

0 commit comments

Comments
 (0)