diff options
author | Tim Smith <tsmith@chef.io> | 2018-02-15 10:58:31 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-02-15 10:58:31 -0800 |
commit | 5a662a4463cce6cd479e8042f92fd6bfb9c85269 (patch) | |
tree | e8aa730761a32090c00b759f4d1dd2b0114d20b8 | |
parent | 7d0592231923c305f34305af678ef35d39c6a9db (diff) | |
download | ohai-5a662a4463cce6cd479e8042f92fd6bfb9c85269.tar.gz |
Raise on V6 plugins instead of warningremove_v6_plugins
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/ohai/loader.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ohai/loader.rb b/lib/ohai/loader.rb index eb28e1e4..452eff92 100644 --- a/lib/ohai/loader.rb +++ b/lib/ohai/loader.rb @@ -91,7 +91,6 @@ module Ohai # Load a specified file as an ohai plugin and creates an instance of it. # Not used by ohai itself, but can be used to load a plugin for testing # purposes. - # plugin_dir_path is required when loading a v6 plugin. def load_plugin(plugin_path, plugin_dir_path = nil) plugin_class = load_plugin_class(plugin_path, plugin_dir_path) return nil unless plugin_class.kind_of?(Class) @@ -123,9 +122,10 @@ module Ohai if contents.include?("Ohai.plugin") load_v7_plugin_class(contents, plugin_path) else - Ohai::Log.warn("[DEPRECATION] Plugin at #{plugin_path} is a version 6 plugin. \ -Version 6 plugins are no longer supported by Ohai. This plugin will need to be updated \ -to the v7 Ohai plugin format. See https://docs.chef.io/ohai_custom.html for v7 syntax.") + raise Exceptions::IllegalPluginDefinition, "[DEPRECATION] Plugin at #{plugin_path}"\ + " is a version 6 plugin. Version 6 plugins are no longer supported by Ohai. This"\ + " plugin will need to be updated to the v7 Ohai plugin format. See"\ + " https://docs.chef.io/ohai_custom.html for v7 syntax." end end |