From a16cab0923f3be46f181dffc209a10c711873f86 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 5 Mar 2025 09:41:32 +0100 Subject: [PATCH] fix(cli): fix wmill user create-token with email and password --- cli/user.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/user.ts b/cli/user.ts index fcd979222b..70e069f303 100644 --- a/cli/user.ts +++ b/cli/user.ts @@ -109,6 +109,8 @@ async function remove(opts: GlobalOptions, email: string) { async function createToken( opts: GlobalOptions & { email: string; password: string } ) { + await requireLogin(opts); + if (opts.email && opts.password) { log.info( "Token: " + @@ -119,9 +121,9 @@ async function createToken( }, })) ); + return; } - await requireLogin(opts); log.info("Token: " + (await wmill.createToken({ requestBody: {} }))); }