# File lib/hiera/backend/eyaml/subcommands/edit.rb, line 54 def self.validate options Trollop::die "You must specify an eyaml file" if ARGV.empty? options[:source] = :eyaml options[:eyaml] = ARGV.shift if File.exists? options[:eyaml] begin options[:input_data] = File.read options[:eyaml] rescue raise StandardError, "Could not open file for reading: #{options[:eyaml]}" end else LoggingHelper.info "#{options[:eyaml]} doesn't exist, editing new file" options[:input_data] = "---" end options end