Skip to content

Instantly share code, notes, and snippets.

@rubysolo
Created May 2, 2023 21:19
Show Gist options
  • Save rubysolo/25600f06d5e0569296032c756ff0efb0 to your computer and use it in GitHub Desktop.
Save rubysolo/25600f06d5e0569296032c756ff0efb0 to your computer and use it in GitHub Desktop.
debug gruntkms errors
envfile = ARGV.first
puts "debugging vars from #{envfile}..."
File.readlines(envfile).each do |line|
if line =~ /kmscrypt/
var, _ = line.split("=")
out = %x(gruntkms decrypt --aws-region $AWS_REGION --ciphertext "#{line}")
if out.start_with?(var)
print "."
else
puts "\nerror decrypting #{var}!"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment