Skip to content
This repository was archived by the owner on Jan 24, 2021. It is now read-only.

Commit 293b2f4

Browse files
committed
Fail if no projects could be built or tested
1 parent 6dbee69 commit 293b2f4

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

build.cake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ Task("Compile")
6161
if (IsRunningOnUnix())
6262
{
6363
var srcProjects = GetFiles("./src/**/*.xproj");
64+
65+
if (srcProjects.Count == 0)
66+
{
67+
throw new CakeException("Unable to find any projects to build.");
68+
}
69+
6470
srcProjects = srcProjects - GetFiles("./**/Nancy.Encryption.MachineKey.xproj");
6571

6672
var testProjects = GetFiles("./test/**/*.xproj");
@@ -293,6 +299,11 @@ Task("Test")
293299
GetFiles("./test/**/*.xproj") -
294300
GetFiles("./test/**/Nancy.ViewEngines.Razor.Tests.Models.xproj");
295301

302+
if (projects.Count == 0)
303+
{
304+
throw new CakeException("Unable to find any projects to test.");
305+
}
306+
296307
if (IsRunningOnUnix())
297308
{
298309
projects = projects

0 commit comments

Comments
 (0)