diff --git a/chef-cli.gemspec b/chef-cli.gemspec index 1a4018f9..08328483 100644 --- a/chef-cli.gemspec +++ b/chef-cli.gemspec @@ -43,7 +43,11 @@ Gem::Specification.new do |gem| gem.add_dependency "mixlib-shellout", ">= 2.0", "< 4.0" gem.add_dependency "ffi-yajl", ">= 1.0", "< 3.0" gem.add_dependency "minitar", "~> 0.6" - gem.add_dependency "chef", ">= 16.0" + if RUBY_VERSION.match?(/3.1/) + gem.add_dependency "chef", "~> 18.0" + else + gem.add_dependency "chef", ">= 16.0" + end gem.add_dependency "solve", "< 5.0", "> 2.0" gem.add_dependency "addressable", ">= 2.3.5", "< 2.9" gem.add_dependency "cookbook-omnifetch", "~> 0.5"