lib/minke/config/reader.rb in minke-1.5.7 vs lib/minke/config/reader.rb in minke-1.5.8
- old
+ new
@@ -90,9 +90,13 @@
end
end
def read_secure hash
key_path = ENV['SSL_KEY_PATH'].to_s == '' ? "#{ENV['HOME']}/.ssh" : ENV['SSL_KEY_PATH']
+ unless Dir.exists? key_path
+ puts "Unable to find SSH keys to decrypt secrets, please set environment variable SSL_KEY_PATH or place the keys in ~/.ssh"
+ return
+ end
fingerprint = hash['secure']['fingerprint']
value = hash['secure']['value']
locator = Minke::Encryption::KeyLocator.new key_path