From 36991b91223706ede49a0055458e229951d03694 Mon Sep 17 00:00:00 2001 From: Alper Ebicoglu Date: Thu, 19 Mar 2020 19:10:33 +0300 Subject: [PATCH] fixes volosoft/volo#1559 --- .../Cli/ProjectBuilding/TemplateProjectBuilder.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs index 6d3fa4b7b8..924fdaf2c9 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateProjectBuilder.cs @@ -8,6 +8,7 @@ using Volo.Abp.Cli.Commands; using Volo.Abp.Cli.Licensing; using Volo.Abp.Cli.ProjectBuilding.Analyticses; using Volo.Abp.Cli.ProjectBuilding.Building; +using Volo.Abp.Cli.ProjectBuilding.Templates.App; using Volo.Abp.DependencyInjection; using Volo.Abp.Json; @@ -55,9 +56,16 @@ namespace Volo.Abp.Cli.ProjectBuilding ); var apiKeyResult = await ApiKeyService.GetApiKeyOrNullAsync(); - if (apiKeyResult?.ApiKey != null) + if (apiKeyResult != null) { - args.ExtraProperties["api-key"] = apiKeyResult.ApiKey; + if (apiKeyResult.ApiKey != null) + { + args.ExtraProperties["api-key"] = apiKeyResult.ApiKey; + } + else if (templateInfo.Name == AppProTemplate.TemplateName) + { + throw new UserFriendlyException(apiKeyResult.ErrorMessage); + } } if (apiKeyResult?.LicenseCode != null)