Skip to content

Commit

Permalink
Improve error report for invalid action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref authored Jan 25, 2024
1 parent 7310ba0 commit ab609d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Runner.Worker/ActionManifestManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public ActionDefinitionData Load(IExecutionContext executionContext, string mani
executionContext.Error(error.Message);
}

throw new ArgumentException($"Fail to load {fileRelativePath}");
throw new ArgumentException($"Failed to load {fileRelativePath}");
}

if (actionDefinition.Execution == null)
Expand Down
2 changes: 1 addition & 1 deletion src/Test/L0/Worker/ActionManifestManagerL0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ public void Load_CompositeActionNoUsing()

//Assert
var err = Assert.Throws<ArgumentException>(() => 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<Issue>(s => s.Message.Contains("Missing 'using' value. 'using' requires 'composite', 'docker', 'node12', 'node16' or 'node20'.")), It.IsAny<ExecutionContextLogOptions>()), Times.Once);
}
finally
Expand Down

0 comments on commit ab609d1

Please sign in to comment.