module ChefConfig::Mixin::Credentials
def parse_credentials_file
-
(String, nil)
-
Other tags:
- Since: - 14.4
def parse_credentials_file credentials_file = credentials_file_path return nil unless File.file?(credentials_file) begin Tomlrb.load_file(credentials_file) rescue => e # TOML's error messages are mostly rubbish, so we'll just give a generic one message = "Unable to parse Credentials file: #{credentials_file}\n" message << e.message raise ChefConfig::ConfigurationError, message end end