Class: Ohai::Config
- Inherits:
-
Object
- Object
- Ohai::Config
- Extended by:
- Mixlib::Config
- Defined in:
- lib/ohai/config.rb
Class Method Summary collapse
-
.platform_specific_path(path) ⇒ Object
from chef/config.rb, should maybe be moved to mixlib-config?.
Class Method Details
.platform_specific_path(path) ⇒ Object
from chef/config.rb, should maybe be moved to mixlib-config?
26 27 28 29 30 31 32 33 34 |
# File 'lib/ohai/config.rb', line 26 def self.platform_specific_path(path) if RUBY_PLATFORM =~ /mswin|mingw|windows/ # turns /etc/chef/client.rb into C:/chef/client.rb path = File.join(ENV['SYSTEMDRIVE'], path.split('/')[2..-1]) # ensure all forward slashes are backslashes path.gsub!(File::SEPARATOR, (File::ALT_SEPARATOR || '\\')) end path end |