diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/CreateCommand.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/CreateCommand.cs index 8dbbcae1..68a49402 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/CreateCommand.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/CreateCommand.cs @@ -104,7 +104,7 @@ public class CreateCommand : IConsoleCommand, ITransientDependency // 解压源码 var extractPath = _sourceCodeManager.ExtractProjectZip(localFilePath, _cliOptions.RepositoryId, version); - var contentPath = templateOptions.Name == "pro" ? Path.Combine(extractPath,_cliOptions.RepositoryId) : Path.Combine(extractPath,_cliOptions.RepositoryId, ".templates", templateOptions.Name); + var contentPath = templateOptions.Name == "pro" ? extractPath : Path.Combine(extractPath, ".templates", templateOptions.Name); // 复制源码到输出目录 var destOutput = Path.Combine(CliPaths.Output, $"{companyName}-{projectName}-{version}"); diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/NewCommand.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/NewCommand.cs index 5cc002bb..2f4ad77d 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/NewCommand.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/NewCommand.cs @@ -111,7 +111,7 @@ public class NewCommand : IConsoleCommand, ITransientDependency // 解压源码 var extractPath = _sourceCodeManager.ExtractProjectZip(localFilePath, _cliOptions.RepositoryId, version); - var contentPath = templateOptions.Name == "pro" ? Path.Combine(extractPath,_cliOptions.RepositoryId) : Path.Combine(extractPath,_cliOptions.RepositoryId, "templates", templateOptions.Name); + var contentPath = templateOptions.Name == "pro" ? extractPath : Path.Combine(extractPath, "templates", templateOptions.Name); // 复制源码到输出目录 var destOutput = Path.Combine(CliPaths.Output, $"{companyName}-{projectName}-{version}"); @@ -143,7 +143,6 @@ public class NewCommand : IConsoleCommand, ITransientDependency var sb = new StringBuilder(); sb.AppendLine(""); sb.AppendLine("Usage:"); - sb.AppendLine(" lion.abp new"); sb.AppendLine("lion.abp new -t 模板名称 -c 公司名称 -p 项目名称 -m 模块名称(创建模块才需要此参数)"); _logger.LogInformation(sb.ToString()); } diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/SourceCode/SourceCodeManager.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/SourceCode/SourceCodeManager.cs index ec4de801..81ed7873 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/SourceCode/SourceCodeManager.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/SourceCode/SourceCodeManager.cs @@ -101,7 +101,7 @@ public class SourceCodeManager : ITransientDependency, ISourceCodeManager var targetPath = Path.Combine(Path.GetDirectoryName(zipPath), repositoryId + "-" + version); try { - if (Directory.Exists(targetPath)) return targetPath; + if (Directory.Exists(targetPath)) return Path.Combine(targetPath, repositoryId); System.IO.Compression.ZipFile.ExtractToDirectory(zipPath, targetPath, Encoding.UTF8, true);