From 385b66f360f222d19fc1ca1e133e3b063ba6af7a Mon Sep 17 00:00:00 2001 From: Alper Ebicoglu Date: Wed, 25 Mar 2020 11:42:09 +0300 Subject: [PATCH] Refactor newcommand --- .../Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs index 3afc32ec4d..c7d7b4a87b 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs @@ -94,7 +94,7 @@ namespace Volo.Abp.Cli.Commands var createSolutionFolder = (commandLineArgs.Options.GetOrNull(Options.CreateSolutionFolder.Short, Options.CreateSolutionFolder.Long) ?? "true").ToLowerInvariant() != "false"; if (!createSolutionFolder) { - Logger.LogInformation("Create Solution Folder: false"); + Logger.LogInformation("Create Solution Folder: no"); } var outputFolder = commandLineArgs.Options.GetOrNull(Options.OutputFolder.Short, Options.OutputFolder.Long); @@ -106,10 +106,7 @@ namespace Volo.Abp.Cli.Commands Path.Combine(outputFolderRoot, SolutionName.Parse(projectName).FullName) : outputFolderRoot; - if (!Directory.Exists(outputFolder)) - { - Directory.CreateDirectory(outputFolder); - } + Volo.Abp.IO.DirectoryHelper.CreateIfNotExists(outputFolder); Logger.LogInformation("Output folder: " + outputFolder);