Merge pull request #10846 from abpframework/berkan/add-cli-compatibility-for-modules-without-test-projects

fix(Cli): `add-module` command doesn't work with modules not contain test project
pull/10847/head
Yunus Emre Kalkan 4 years ago committed by GitHub
commit b419ba7b17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -130,10 +130,14 @@ namespace Volo.Abp.Cli.ProjectModification
"*.csproj",
SearchOption.AllDirectories);
var projectsUnderTest = Directory.GetFiles(
Path.Combine(Path.GetDirectoryName(solutionFile), "modules", module.Name, "test"),
"*.csproj",
SearchOption.AllDirectories);
var projectsUnderTest = new List<string>();
if (Directory.Exists(Path.Combine(Path.GetDirectoryName(solutionFile), "modules", module.Name, "test")))
{
projectsUnderTest = Directory.GetFiles(
Path.Combine(Path.GetDirectoryName(solutionFile), "modules", module.Name, "test"),
"*.csproj",
SearchOption.AllDirectories).ToList();
}
foreach (var projectPath in projectsUnderModule)
{

Loading…
Cancel
Save