Method: Chef::Application::ExitCode.normalize_exit_code

Defined in:
lib/chef/application/exit_code.rb

.normalize_exit_code(exit_code = nil) ⇒ Object



51
52
53
54
55
56
57
58
59
# File 'lib/chef/application/exit_code.rb', line 51

def normalize_exit_code(exit_code = nil)
  normalized_exit_code = normalize_legacy_exit_code(exit_code)
  if valid_exit_codes.include? normalized_exit_code
    normalized_exit_code
  else
    Chef::Log.warn(non_standard_exit_code_warning(normalized_exit_code))
    VALID_RFC_062_EXIT_CODES[:GENERIC_FAILURE]
  end
end