Check runner group when there is only default runner group. (#1172)

* Check runner group when there is only `default` runner group.

* L0
This commit is contained in:
Tingluo Huang
2021-07-02 09:31:54 -07:00
committed by GitHub
parent 7c90b2a929
commit 09821e2169
2 changed files with 44 additions and 1 deletions

View File

@@ -165,7 +165,7 @@ namespace GitHub.Runner.Listener.Configuration
List<TaskAgentPool> agentPools = await _runnerServer.GetAgentPoolsAsync();
TaskAgentPool defaultPool = agentPools?.Where(x => x.IsInternal).FirstOrDefault();
if (agentPools?.Where(x => !x.IsHosted).Count() > 1)
if (agentPools?.Where(x => !x.IsHosted).Count() > 0)
{
poolName = command.GetRunnerGroupName(defaultPool?.Name);
_term.WriteLine();