thandle failure in load_key when key is not retrieved from stdin - tomb - the crypto undertaker (HTM) git clone git://parazyd.org/tomb.git (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 90e46854bc89700a15d61986581ebc5ca493e68d (DIR) parent ca012e8744198343ed577cffae7e86ef8532cd86 (HTM) Author: Jaromil <jaromil@dyne.org> Date: Tue, 27 Jan 2015 17:31:09 +0100 handle failure in load_key when key is not retrieved from stdin Diffstat: M tomb | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) --- (DIR) diff --git a/tomb b/tomb t@@ -879,6 +879,12 @@ _load_key() { _verbose "load_key: ::1 key::" $TOMBKEYFILE + [[ "$TOMBKEY" = "" ]] && { + # something went wrong, there is no key to load + # this occurs especially when piping from stdin and aborted + _failure "Key not found, specify one using -k." + } + is_valid_key $TOMBKEY || { _warning "The key seems invalid or its format is not known by this version of Tomb." _tomb_key_recover $TOMBKEY