From 2c6cd5508f5e1eddac20cae505d1947c575bb494 Mon Sep 17 00:00:00 2001 From: Claire McQuin Date: Tue, 3 Sep 2013 21:12:51 -0700 Subject: store relative plugin paths in v6_dependency_solver --- lib/ohai/system.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/ohai/system.rb') diff --git a/lib/ohai/system.rb b/lib/ohai/system.rb index c31a1d50..b63b4c08 100644 --- a/lib/ohai/system.rb +++ b/lib/ohai/system.rb @@ -59,9 +59,10 @@ module Ohai file_regex = Regexp.new("#{File.expand_path(path)}#{File::SEPARATOR}(.+).rb$") md = file_regex.match(file) if md - unless @v6_dependency_solver.has_key?(file) + plugin_name = md[1].gsub(File::SEPARATOR, "::") + unless @v6_dependency_solver.has_key?(plugin_name) plugin = loader.load_plugin(file) - @v6_dependency_solver[file] = plugin unless plugin.nil? + @v6_dependency_solver[plugin_name] = plugin unless plugin.nil? else Ohai::Log.debug("Already loaded plugin at #{file}") end -- cgit v1.2.1