Skip to content

Commit

Permalink
VCI-237: Fix .nuke directory check
Browse files Browse the repository at this point in the history
  • Loading branch information
krankenbro committed Dec 20, 2021
1 parent 22b4907 commit 629212c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/VirtoCommerce.Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ public static int Main(string[] args)
Environment.Exit(0);
}

var nukeFiles = Directory.GetFiles(Directory.GetCurrentDirectory(), ".nuke");
var currentDirectory = Directory.GetCurrentDirectory();

if (!nukeFiles.Any() && !Directory.Exists(RootDirectory / ".nuke"))
var nukeFiles = Directory.GetFiles(currentDirectory, ".nuke");

if (!nukeFiles.Any() && !Directory.Exists(Path.Join(currentDirectory, ".nuke")))
{
Logger.Info("No .nuke file found!");
var solutions = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.sln");
var solutions = Directory.GetFiles(currentDirectory, "*.sln");

if (solutions.Length == 1)
{
Expand All @@ -92,7 +94,7 @@ public static int Main(string[] args)
}
else if (solutions.Length < 1)
{
CreateDotNuke(Directory.GetCurrentDirectory());
CreateDotNuke(currentDirectory);
}
}
else if(nukeFiles.Any())
Expand Down

0 comments on commit 629212c

Please sign in to comment.