Skip to content

Commit

Permalink
Do not emit errors in the console when comparing null permissions tab…
Browse files Browse the repository at this point in the history
…les for request URLs within the same HTTP request block. (#289)
  • Loading branch information
millicentachieng authored Sep 9, 2024
1 parent 6804550 commit e956725
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ApiDoctor.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3143,7 +3143,7 @@ private static string GetPermissionsMarkdownTableForHttpRequestBlock(Permissions
var requestPermissions = generator.GenerateTable();
newPermissionFileContents ??= requestPermissions;

if (!newPermissionFileContents.Equals(requestPermissions, StringComparison.OrdinalIgnoreCase))
if (!string.IsNullOrWhiteSpace(newPermissionFileContents) && !string.IsNullOrWhiteSpace(requestPermissions) && !newPermissionFileContents.Equals(requestPermissions, StringComparison.OrdinalIgnoreCase))
{
FancyConsole.WriteLine(ConsoleColor.Yellow, $"Encountered request URL(s) for permissions table ({permissionsTablePosition}) in {docFileName} with a different set of permissions");
}
Expand Down

0 comments on commit e956725

Please sign in to comment.