Skip to content

Commit

Permalink
Update Plugins/GRPCProtobufGenerator/Plugin.swift
Browse files Browse the repository at this point in the history
Co-authored-by: George Barnett <[email protected]>
  • Loading branch information
rnro and glbrntt authored Jan 14, 2025
1 parent 1749e56 commit 87197c6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Plugins/GRPCProtobufGenerator/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ struct GRPCProtobufGenerator {
/// - Parameter configurationFiles: URLs from which to load configuration
/// - Returns: A map of source URLs to loaded configuration
func readConfigurationFiles(
_ configurationFiles: [URL],
_ configFilePaths: [URL],
pluginWorkDirectory: URL
) throws -> [URL: GenerationConfig] {
var configs: [URL: GenerationConfig] = [:]
for configFile in configurationFiles {
for configFilePath in configFilePaths {
let data = try Data(contentsOf: configFile)
let configuration = try JSONDecoder().decode(BuildPluginConfig.self, from: data)
let config = try JSONDecoder().decode(BuildPluginConfig.self, from: data)

// the output directory mandated by the plugin system
configs[configFile] = GenerationConfig(
configurationFile: configuration,
configurationFilePath: configFile,
configs[configFilePath] = GenerationConfig(
configurationFile: config,
configurationFilePath: configFilePath,
outputPath: pluginWorkDirectory
)
}
Expand Down

0 comments on commit 87197c6

Please sign in to comment.