manage

in chef/cookbooks/cpe_shims/resources/cpe_shims.rb [72:93]


  def manage
    return unless node['cpe_shims']['manage']

    shims = node['cpe_shims']['shims'].to_hash
    return if shims.empty? || shims.nil?

    linux_manage(shims) if shim_unix_os?
    windows_manage if windows?

    items_to_manage = []
    
    shims.values.each do |shim|
      items_to_manage.push(shim['path'])
    end

    
    json_path = ::File.join(Chef::Config[:file_cache_path], 'cpe_shims.json')

    cleanup(items_to_manage, json_path) if shim_unix_os?
    update_json_file(items_to_manage, json_path) if shim_unix_os?
  end