mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-25 22:27:34 +00:00
handle failure in load_key when key is not retrieved from stdin
This commit is contained in:
parent
ca012e8744
commit
90e46854bc
6
tomb
6
tomb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user