Exit badly if no note is found
authorSergey Matveev <stargrave@stargrave.org>
Wed, 24 Jul 2019 10:35:40 +0000 (13:35 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 24 Jul 2019 10:35:40 +0000 (13:35 +0300)
t

diff --git a/t b/t
index 4dec0a51c17846e82355656ede9dd57dafc0d7fb..c1c85cc5fc9f092273218a06c096e0e48fcb8e20 100755 (executable)
--- a/t
+++ b/t
@@ -44,7 +44,8 @@ m)
     $EDITOR $(get_note $2)
     ;;
 *)
-    cat $(get_note $1)
+    note=$(get_note $1)
+    [ -e "$note" ] && cat $note || exit 1
     ;;
 esac
 purge