From 9525c3c8c59b54fc48558eb9162aa0ca44d8e6f7 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Wed, 8 May 2019 06:30:26 +0200 Subject: [PATCH] You can now use `--login` and `--help` without being logged in. (D'oh.) --- matrix.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix.sh b/matrix.sh index c8d6ed7..5ed2ab2 100755 --- a/matrix.sh +++ b/matrix.sh @@ -328,8 +328,6 @@ if [ "$ACTION" = "" ]; then exit 1 fi -[ -z $MATRIX_HOMESERVER ] && die "No homeserver set. Use '$0 --login' to log into an account on the given server and persist those settings." - if [ "$ACTION" = "login" ]; then login # Do not exit here. We want select_room to run as well. @@ -338,6 +336,8 @@ elif [ "$ACTION" = "help" ]; then exit 1 fi +[ -z $MATRIX_HOMESERVER ] && die "No homeserver set. Use '$0 --login' to log into an account on a homeserver and persist those settings." + [ -z $MATRIX_TOKEN ] && die "No matrix token set. Use '$0 --login' to login." AUTHORIZATION="Authorization: Bearer $MATRIX_TOKEN"