Class: Chef::Knife

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/knife/block.rb

Instance Method Summary collapse

Instance Method Details

#get_config_fileObject



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/chef/knife/block.rb', line 13

def get_config_file

  # locate_config_file is only compatible with Chef 11
  _chef11 = ::Chef::Version.new('11.0.0')
  if GreenAndSecure.current_chef_version >= _chef11
    locate_config_file if not config[:config_file]
  else
    GreenAndSecure.locate_config_file config
  end

  File.dirname(config[:config_file])
end