From 4661b725df242ce2890f0e6cf7ceea977f7f868f Mon Sep 17 00:00:00 2001 From: joshr Date: Tue, 24 Apr 2018 07:57:13 -0400 Subject: [PATCH] abort if unable to decrypt hidden file --- src/commands/git_secret_reveal.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/git_secret_reveal.sh b/src/commands/git_secret_reveal.sh index da8dee66..82e04f9d 100644 --- a/src/commands/git_secret_reveal.sh +++ b/src/commands/git_secret_reveal.sh @@ -42,6 +42,10 @@ function reveal { # The parameters are: filename, write-to-file, force, homedir, passphrase _decrypt "$path" "1" "$force" "$homedir" "$passphrase" + if [[ ! -f "$path" ]]; then + _abort "cannot find decrypted version of file: $filename" + fi + counter=$((counter+1)) done < "$path_mappings"