Skip to content

Commit

Permalink
feat(): dead code
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Feser <[email protected]>
  • Loading branch information
joefeser committed Aug 10, 2024
1 parent 18302e3 commit 44310c0
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/ApiGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,29 +200,5 @@ private static bool Ask(string question, bool defaultAnswer = true)
}
return defaultAnswer;
}

/// <summary>
/// Since we are most likely not running in the root of the project, we need to find the root path that contains the sln
/// </summary>
/// <param name="basePath"></param>
/// <returns></returns>
private static DirectoryInfo GetRootPath(string basePath) => RecursiveFindRoot(new FileInfo(basePath).Directory);

private static DirectoryInfo RecursiveFindRoot(DirectoryInfo directory)
{
if (directory is null)
{
return null;
}

var file = directory.GetFiles("*.sln").FirstOrDefault(item => item.Name.Equals("OpenSearch.sln", StringComparison.OrdinalIgnoreCase));

if (file is not null)
{
return directory;
}

return RecursiveFindRoot(directory.Parent);
}
}
}

0 comments on commit 44310c0

Please sign in to comment.