Capture telemetry when git errors on unsafe repository. (#1823)

This commit is contained in:
Tingluo Huang
2022-04-13 12:48:52 -04:00
committed by GitHub
parent b6195624ac
commit 44d4d076fe
2 changed files with 21 additions and 1 deletions

View File

@@ -151,6 +151,11 @@ namespace GitHub.Runner.Worker.Handlers
}
}
if (line.Contains("fatal: unsafe repository", StringComparison.OrdinalIgnoreCase))
{
_executionContext.StepTelemetry.ErrorMessages.Add(line);
}
// Regular output
_executionContext.Output(line);
}