Browse Source

fix: fix cli

pull/1103/head
colin 12 months ago
parent
commit
b0054284c2
  1. 3
      aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.IP.Location/FodyWeavers.xml
  2. 2
      aspnet-core/framework/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj
  3. 11
      aspnet-core/framework/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/Commands/HelpCommand.cs

3
aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.IP.Location/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

2
aspnet-core/framework/cli/LINGYUN.Abp.Cli/LINGYUN.Abp.Cli.csproj

@ -5,7 +5,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<Version>8.3.0</Version>
<Version>9.0.4</Version>
<Copyright>colin</Copyright>
<Description>Use LINGYUN.MicroService.Templates command line</Description>
<PackAsTool>true</PackAsTool>

11
aspnet-core/framework/cli/LINGYUN.Abp.Cli/LINGYUN/Abp/Cli/Commands/HelpCommand.cs

@ -3,6 +3,7 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Cli;
@ -70,14 +71,14 @@ namespace LINGYUN.Abp.Cli.Commands
foreach (var command in AbpCliOptions.Commands.ToArray())
{
string shortDescription;
using (var scope = ServiceScopeFactory.CreateScope())
var method = command.Value.GetMethod("GetShortDescription", BindingFlags.Static | BindingFlags.Public);
if (method == null)
{
shortDescription = ((IConsoleCommand)scope.ServiceProvider
.GetRequiredService(command.Value)).GetShortDescription();
continue;
}
var shortDescription = (string)method.Invoke(null, null);
sb.Append(" > ");
sb.Append(command.Key);
sb.Append(string.IsNullOrWhiteSpace(shortDescription) ? "" : ":");

Loading…
Cancel
Save