Browse Source

Merge pull request #2057 from abpframework/maliming/cli-output-folder

Cli new command to create a project folder.
pull/2079/head
Yunus Emre Kalkan 7 years ago
committed by GitHub
parent
commit
f62007c615
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs

15
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs

@ -71,18 +71,13 @@ namespace Volo.Abp.Cli.Commands
}
var outputFolder = commandLineArgs.Options.GetOrNull(Options.OutputFolder.Short, Options.OutputFolder.Long);
if (outputFolder != null)
{
if (!Directory.Exists(outputFolder))
{
Directory.CreateDirectory(outputFolder);
}
outputFolder = Path.GetFullPath(outputFolder);
}
else
outputFolder = Path.Combine(outputFolder != null ? Path.GetFullPath(outputFolder) : Directory.GetCurrentDirectory(),
SolutionName.Parse(commandLineArgs.Target).FullName);
if (!Directory.Exists(outputFolder))
{
outputFolder = Directory.GetCurrentDirectory();
Directory.CreateDirectory(outputFolder);
}
Logger.LogInformation("Output folder: " + outputFolder);

Loading…
Cancel
Save