From fa874cf3147fb93e90d9043b1bc7b8f3c0042356 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 6 Feb 2024 08:40:53 -0500 Subject: [PATCH] Improve error report for invalid action.yml (#3106) --- src/Runner.Worker/ActionManifestManager.cs | 2 +- src/Test/L0/Worker/ActionManifestManagerL0.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Runner.Worker/ActionManifestManager.cs b/src/Runner.Worker/ActionManifestManager.cs index 6b46e6a4e..351c2427d 100644 --- a/src/Runner.Worker/ActionManifestManager.cs +++ b/src/Runner.Worker/ActionManifestManager.cs @@ -144,7 +144,7 @@ namespace GitHub.Runner.Worker executionContext.Error(error.Message); } - throw new ArgumentException($"Fail to load {fileRelativePath}"); + throw new ArgumentException($"Failed to load {fileRelativePath}"); } if (actionDefinition.Execution == null) diff --git a/src/Test/L0/Worker/ActionManifestManagerL0.cs b/src/Test/L0/Worker/ActionManifestManagerL0.cs index 385ae9463..91f604c06 100644 --- a/src/Test/L0/Worker/ActionManifestManagerL0.cs +++ b/src/Test/L0/Worker/ActionManifestManagerL0.cs @@ -757,7 +757,7 @@ namespace GitHub.Runner.Common.Tests.Worker //Assert var err = Assert.Throws(() => actionManifest.Load(_ec.Object, action_path)); - Assert.Contains($"Fail to load {action_path}", err.Message); + Assert.Contains($"Failed to load {action_path}", err.Message); _ec.Verify(x => x.AddIssue(It.Is(s => s.Message.Contains("Missing 'using' value. 'using' requires 'composite', 'docker', 'node12', 'node16' or 'node20'.")), It.IsAny()), Times.Once); } finally