Skip to content

Commit 61933e0

Browse files
fix error when no recipients
1 parent f96058e commit 61933e0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sherlog-cli/Program.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ static async Task<int> Main(string[] args)
149149
return -1;
150150
}
151151

152+
if (recipients.Count == 0)
153+
{
154+
Console.WriteLine("No recipients found for tenant. Please set up in NetBox first.");
155+
return -1;
156+
}
157+
152158
Console.Write("\n");
153159
var selectedRecipients = Prompt.MultiSelect("Select stakeholders to be notified on this log entry?", recipients, pageSize: 3).ToList();
154160

0 commit comments

Comments
 (0)