class Pfm::Settings

def load_config

load the config file and resolve file paths if set
def load_config
  if config_exists?
    require 'yaml'
    YAML.load_file(config_file).each do |key, value|
      msg("WARNING: unrecognized config key: '#{key}'") unless @settings.key? key
      next unless @settings.key? key
      required = @settings[key].required?
      @settings[key] = Setting.new(value, required)
    end
    # Also load each setting into the environment
    @settings.each { |key, setting| ENV[key] = setting.value }
    # Resolve paths if set
    resolve_paths if @expand
  else
    create_config
    load_config
  end
end