class ChefCLI::Command::Export

def run(params = [])

def run(params = [])
  return 1 unless apply_params!(params)
  export_service.run
  ui.msg("Exported policy '#{export_service.policyfile_lock.name}' to #{export_target}")
  unless archive?
    ui.msg("")
    ui.msg("To converge this system with the exported policy, run:")
    ui.msg("  cd #{export_dir}")
    ui.msg("  #{ChefCLI::Dist::INFRA_CLIENT_CLI} -z")
  end
  0
rescue ExportDirNotEmpty => e
  ui.err("ERROR: " + e.message)
  ui.err("Use --force to force export")
  1
rescue PolicyfileServiceError => e
  handle_error(e)
  1
end