summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-12-09 22:18:16 -0500
committerTim Smith <tsmith84@gmail.com>2021-12-09 22:18:16 -0500
commit2c9ae5e9b8216f6f4378de2fb97541e1ddfa8d17 (patch)
tree779c9c4f846f433cacf2680e4616f83253012088
parentb16a591af0390d03f5450f67034df3c2aa9d1376 (diff)
downloadohai-2c9ae5e9b8216f6f4378de2fb97541e1ddfa8d17.tar.gz
Fix the exception handling in the chef plugin
This wasn't actually rescuing. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/ohai/plugins/chef.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/chef.rb b/lib/ohai/plugins/chef.rb
index ae027727..89e245a5 100644
--- a/lib/ohai/plugins/chef.rb
+++ b/lib/ohai/plugins/chef.rb
@@ -33,7 +33,7 @@ Ohai.plugin(:Chef) do
begin
require "chef/version"
require "chef-config/config" unless defined?(ChefConfig::Config)
- rescue Gem::LoadError
+ rescue LoadError
logger.trace("Plugin Chef: Unable to load the chef gem to determine the version")
# this catches when you've done a major version bump of ohai, but
# your chef gem is incompatible, so we can't load it in the same VM