Browse Source
Merge pull request #1363 from abpframework/maliming/issue1362
fix #1362 Call the asynchronous GetUsageInfo method correctly
pull/1369/head
Halil İbrahim Kalkan
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
7 additions and
6 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddModuleCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddPackageCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/UpdateCommand.cs
|
|
|
@ -27,7 +27,7 @@ namespace Volo.Abp.Cli.Commands |
|
|
|
{ |
|
|
|
if (commandLineArgs.Target == null) |
|
|
|
{ |
|
|
|
throw new CliUsageException("Module name is missing!" + Environment.NewLine + Environment.NewLine + GetUsageInfo()); |
|
|
|
throw new CliUsageException("Module name is missing!" + Environment.NewLine + Environment.NewLine + await GetUsageInfo()); |
|
|
|
} |
|
|
|
|
|
|
|
var skipDbMigrations = Convert.ToBoolean( |
|
|
|
|
|
|
|
@ -27,7 +27,7 @@ namespace Volo.Abp.Cli.Commands |
|
|
|
{ |
|
|
|
if (commandLineArgs.Target == null) |
|
|
|
{ |
|
|
|
throw new CliUsageException("Package name is missing!" + Environment.NewLine + Environment.NewLine + GetUsageInfo()); |
|
|
|
throw new CliUsageException("Package name is missing!" + Environment.NewLine + Environment.NewLine + await GetUsageInfo()); |
|
|
|
} |
|
|
|
|
|
|
|
await ProjectNugetPackageAdder.AddAsync( |
|
|
|
|
|
|
|
@ -26,14 +26,14 @@ namespace Volo.Abp.Cli.Commands |
|
|
|
{ |
|
|
|
if (commandLineArgs.Target.IsNullOrEmpty()) |
|
|
|
{ |
|
|
|
throw new CliUsageException("Username name is missing!" + Environment.NewLine + Environment.NewLine + GetUsageInfo()); |
|
|
|
throw new CliUsageException("Username name is missing!" + Environment.NewLine + Environment.NewLine + await GetUsageInfo()); |
|
|
|
} |
|
|
|
|
|
|
|
Console.Write("Password: "); |
|
|
|
var password = ConsoleHelper.ReadSecret(); |
|
|
|
if (password.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
throw new CliUsageException("Password name is missing!" + Environment.NewLine + Environment.NewLine + GetUsageInfo()); |
|
|
|
throw new CliUsageException("Password name is missing!" + Environment.NewLine + Environment.NewLine + await GetUsageInfo()); |
|
|
|
} |
|
|
|
|
|
|
|
await AuthService.LoginAsync(commandLineArgs.Target, password); |
|
|
|
|
|
|
|
@ -29,7 +29,7 @@ namespace Volo.Abp.Cli.Commands |
|
|
|
{ |
|
|
|
if (commandLineArgs.Target == null) |
|
|
|
{ |
|
|
|
throw new CliUsageException("Project name is missing!" + Environment.NewLine + Environment.NewLine + GetUsageInfo()); |
|
|
|
throw new CliUsageException("Project name is missing!" + Environment.NewLine + Environment.NewLine + await GetUsageInfo()); |
|
|
|
} |
|
|
|
|
|
|
|
Logger.LogInformation("Creating a new project..."); |
|
|
|
|
|
|
|
@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging.Abstractions; |
|
|
|
using Volo.Abp.Cli.Args; |
|
|
|
using Volo.Abp.Cli.ProjectModification; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
using Volo.Abp.Threading; |
|
|
|
|
|
|
|
namespace Volo.Abp.Cli.Commands |
|
|
|
{ |
|
|
|
@ -67,7 +68,7 @@ namespace Volo.Abp.Cli.Commands |
|
|
|
} |
|
|
|
|
|
|
|
throw new CliUsageException("No solution or project found in this directory." + Environment.NewLine + |
|
|
|
Environment.NewLine + GetUsageInfo()); |
|
|
|
Environment.NewLine + AsyncHelper.RunSync(GetUsageInfo)); |
|
|
|
} |
|
|
|
|
|
|
|
public Task<string> GetUsageInfo() |
|
|
|
|