You can now use --login and --help without being logged in. (D'oh.)

This commit is contained in:
Fabian Schlenz 2019-05-08 06:30:26 +02:00
parent 2f1cd0b169
commit 9525c3c8c5

View file

@ -328,8 +328,6 @@ if [ "$ACTION" = "" ]; then
exit 1 exit 1
fi 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 if [ "$ACTION" = "login" ]; then
login login
# Do not exit here. We want select_room to run as well. # Do not exit here. We want select_room to run as well.
@ -338,6 +336,8 @@ elif [ "$ACTION" = "help" ]; then
exit 1 exit 1
fi 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." [ -z $MATRIX_TOKEN ] && die "No matrix token set. Use '$0 --login' to login."
AUTHORIZATION="Authorization: Bearer $MATRIX_TOKEN" AUTHORIZATION="Authorization: Bearer $MATRIX_TOKEN"