From 02e4bde64eda7b8f4b586980fceee546fc644fce Mon Sep 17 00:00:00 2001 From: Josh Rabinowitz Date: Sat, 14 Apr 2018 09:27:55 -0400 Subject: [PATCH] better error checking --- src/commands/git_secret_cat.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commands/git_secret_cat.sh b/src/commands/git_secret_cat.sh index 4ada2016..f656a9c7 100644 --- a/src/commands/git_secret_cat.sh +++ b/src/commands/git_secret_cat.sh @@ -36,5 +36,8 @@ function cat { # The parameters are: filename, write-to-file, force, homedir, passphrase _decrypt "$path" "0" "0" "$homedir" "$passphrase" + if [[ "$?" ne "0" ]]; then + _abort( "error decrypting $(filename): $?" ) + fi done }