Skip to content

Commit

Permalink
Avoid empty patches folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmorato committed Jun 26, 2024
1 parent c05ef20 commit 87e0855
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Build/OpenDDSharp.Build/Tasks/SetupThirdPartyTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,17 @@ public override void Run(BuildContext context)
}

context.Log.Information("Apply required OpenDDSharp patches to OpenDDS...");
foreach (var patchPath in Directory.GetFiles(BuildContext.PATCHES_FOLDER, "*.patch"))
if (!Directory.Exists(BuildContext.PATCHES_FOLDER))
{
return;
}
var patches = Directory.EnumerateFiles(BuildContext.PATCHES_FOLDER, "*.patch");
var patchPaths = patches as string[] ?? patches.ToArray();
if (!patchPaths.Any())
{
return;
}
foreach (var patchPath in patchPaths)
{
var patchDirectory = new DirectoryPath(patchPath);
if (BuildContext.IsLinux)
Expand Down

0 comments on commit 87e0855

Please sign in to comment.