Method: ChefConfig::Config.platform_specific_path
- Defined in:
- lib/chef-config/config.rb
.platform_specific_path(path) ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/chef-config/config.rb', line 47 def self.platform_specific_path(path) path = PathHelper.cleanpath(path) if ChefConfig.windows? # turns \etc\chef\client.rb and \var\chef\client.rb into C:/chef/client.rb if env['SYSTEMDRIVE'] && path[0] == '\\' && path.split('\\')[2] == 'chef' path = PathHelper.join(env['SYSTEMDRIVE'], path.split('\\', 3)[2]) end end path end |