vmfloaty/lib/vmfloaty/conf.rb
Nate Wolfe 04c73a970d
(maint) Remove warning about missing configuration file
Previously the CLI would emit a warning about missing configuration
file, but a configuration file does not appear to be a requirement, at
least based on the documentation and the fact that everything can be
specified directly on the command line.

This commit simply removes the warning.

Users will no longer get a warning when doing things like `floaty
--version`, `floaty help`, and any other subcommand.
2020-08-21 14:38:04 -07:00

15 lines
229 B
Ruby

# frozen_string_literal: true
require 'yaml'
class Conf
def self.read_config
conf = {}
begin
conf = YAML.load_file("#{Dir.home}/.vmfloaty.yml")
rescue StandardError
# ignore
end
conf
end
end