Browse Source
Merge pull request #15680 from abpframework/cli-fix-login-info-error-text
Cli: Check if user is logged in before trying to get login info
pull/15685/head
Berkan Sasmaz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginInfoCommand.cs
|
|
|
@ -25,6 +25,12 @@ public class LoginInfoCommand : IConsoleCommand, ITransientDependency |
|
|
|
|
|
|
|
public async Task ExecuteAsync(CommandLineArgs commandLineArgs) |
|
|
|
{ |
|
|
|
if (!AuthService.IsLoggedIn()) |
|
|
|
{ |
|
|
|
Logger.LogError("You are not logged in."); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var loginInfo = await AuthService.GetLoginInfoAsync(); |
|
|
|
|
|
|
|
if (loginInfo == null) |
|
|
|
|