summaryrefslogtreecommitdiff
path: root/lib/ohai/loader.rb
diff options
context:
space:
mode:
authorClaire McQuin <clairemcquin@seamcquin100loaner.local>2014-01-07 14:31:08 -0800
committerClaire McQuin <clairemcquin@seamcquin100loaner.local>2014-01-07 14:31:08 -0800
commit28fbf418568902017706a59bf353c109e754595c (patch)
tree37accec56d798b863b0261c8e8c9e4a77e5bd29d /lib/ohai/loader.rb
parent12e4a5b607ad45c91cc488f6a0308268648eb7c4 (diff)
downloadohai-28fbf418568902017706a59bf353c109e754595c.tar.gz
save plugin source(s) for version 7 plugins during loading
Diffstat (limited to 'lib/ohai/loader.rb')
-rw-r--r--lib/ohai/loader.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ohai/loader.rb b/lib/ohai/loader.rb
index b02b65ed..28270290 100644
--- a/lib/ohai/loader.rb
+++ b/lib/ohai/loader.rb
@@ -168,6 +168,7 @@ For more information visit here: docs.opscode.com/ohai_custom.html")
unless plugin_class.kind_of?(Class) and plugin_class < Ohai::DSL::Plugin
raise Ohai::Exceptions::IllegalPluginDefinition, "Plugin file cannot contain any statements after the plugin definition"
end
+ plugin_class.sources << plugin_path
@v7_plugin_classes << plugin_class unless @v7_plugin_classes.include?(plugin_class)
plugin_class
rescue SystemExit, Interrupt