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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
10 deletions
-
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); |
|
|
|
|