def self.gnupghome
gnupghome = self.option :gnupghome
debug("GNUPGHOME is #{gnupghome}")
if gnupghome.nil? || gnupghome.empty?
warn("No GPG home directory configured, check gpg_gnupghome configuration value is correct")
raise ArgumentError, "No GPG home directory configured, check gpg_gnupghome configuration value is correct"
elsif !File.directory?(gnupghome)
warn("Configured GPG home directory #{gnupghome} doesn't exist, check gpg_gnupghome configuration value is correct")
raise ArgumentError, "Configured GPG home directory #{gnupghome} doesn't exist, check gpg_gnupghome configuration value is correct"
else
gnupghome
end
end