diff --git a/openpgp/gitprotect.sh b/openpgp/gitprotect.sh index 672c50860b31af79ba1f11c8733f86f1766550ce..3fde2c84f33929cc5c0c90e2ffb82c1d689bca4c 100755 --- a/openpgp/gitprotect.sh +++ b/openpgp/gitprotect.sh @@ -290,8 +290,8 @@ elif [[ $command = "decrypt" ]]; then filename=$(basename "$filePath" ".gpg") # Remove the "decrypted" file if decryption had failed. - if ! gpg2 --decrypt "$filePath" > "decrypted/$filename"; then - echo "ERROR: Failed to decrypt file '$filepath'. No private key available." >&2 + if ! gpg2 --quiet --decrypt "$filePath" > "decrypted/$filename"; then + echo "ERROR: Failed to decrypt file '$filePath'. No private key available." >&2 rm "decrypted/$filename" fi done < <(find . -maxdepth 1 -name '*.gpg')