Skip to content

Commit ab04edc

Browse files
committed
Review feedback: fix a forgotten error message from plugin deserialization
1 parent 156500d commit ab04edc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/PackagePlugin/Implementation.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ extension Plugin {
5454
switch context.pluginAction {
5555
case .createBuildToolCommands:
5656
// Check that the plugin conforms to `BuildToolPlugin`, and get the commands.
57-
guard let plugin = plugin as? BuildToolPlugin else { throw PluginDeserializationError.malformedInputJSON("...") }
57+
guard let plugin = plugin as? BuildToolPlugin else {
58+
throw PluginDeserializationError.malformedInputJSON("Plugin declared with `buildTool` capability but doesn't conform to `BuildToolPlugin` protocol")
59+
}
5860
let commands = try plugin.createBuildCommands(context: context)
5961

6062
// Convert the commands to the encodable output representation SwiftPM currently expects.

0 commit comments

Comments
 (0)