mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
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.
15 lines
229 B
Ruby
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
|