mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Compare commits
1 Commits
v2.296.2
...
users/tihu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d316c0a75 |
@@ -154,6 +154,12 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
if (line.Contains("fatal: unsafe repository", StringComparison.OrdinalIgnoreCase))
|
if (line.Contains("fatal: unsafe repository", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
_executionContext.StepTelemetry.ErrorMessages.Add(line);
|
_executionContext.StepTelemetry.ErrorMessages.Add(line);
|
||||||
|
var gitUnsafeDirNotice = new DTWebApi.Issue
|
||||||
|
{
|
||||||
|
Message = $"You may experience error caused by a recently git safe directory enforcement. For more information see: https://github.blog/changelog/xxx",
|
||||||
|
Type = DTWebApi.IssueType.Notice,
|
||||||
|
};
|
||||||
|
_executionContext.AddIssue(gitUnsafeDirNotice);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regular output
|
// Regular output
|
||||||
|
|||||||
@@ -947,6 +947,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
{
|
{
|
||||||
Process("fatal: unsafe repository ('/github/workspace' is owned by someone else)");
|
Process("fatal: unsafe repository ('/github/workspace' is owned by someone else)");
|
||||||
Assert.Contains("fatal: unsafe repository ('/github/workspace' is owned by someone else)", _executionContext.Object.StepTelemetry.ErrorMessages);
|
Assert.Contains("fatal: unsafe repository ('/github/workspace' is owned by someone else)", _executionContext.Object.StepTelemetry.ErrorMessages);
|
||||||
|
Assert.Contains(_issues, x => x.Item1.Type == DTWebApi.IssueType.Notice && x.Item1.Message.Contains("You may experience error caused by a recently git safe directory enforcement"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user