@@ -97,7 +97,8 @@ struct GRPCProtobufGenerator {
9797 baseDirectoryPath: configFilePath. deletingLastPathComponent ( ) ,
9898 protoDirectoryPaths: protoDirectoryPaths,
9999 protocPath: protocPath,
100- protocGenGRPCSwiftPath: protocGenGRPCSwiftPath
100+ protocGenGRPCSwiftPath: protocGenGRPCSwiftPath,
101+ configFilePath: configFilePath
101102 )
102103 commands. append ( grpcCommand)
103104 }
@@ -174,14 +175,16 @@ extension [URL: GenerationConfig] {
174175/// - protoDirectoryPaths: The paths passed to `protoc` in which to look for imported proto files.
175176/// - protocPath: The path to `protoc`
176177/// - protocGenGRPCSwiftPath: The path to `protoc-gen-grpc-swift`.
178+ /// - configFilePath: The path to the config file in use.
177179/// - Returns: The command to invoke `protoc` with the `protoc-gen-grpc-swift` plugin.
178180func protocGenGRPCSwiftCommand(
179181 inputFile: URL ,
180182 config: GenerationConfig ,
181183 baseDirectoryPath: URL ,
182184 protoDirectoryPaths: [ String ] ,
183185 protocPath: URL ,
184- protocGenGRPCSwiftPath: URL
186+ protocGenGRPCSwiftPath: URL ,
187+ configFilePath: URL
185188) throws -> PackagePlugin . Command {
186189 let outputPathURL = URL ( fileURLWithPath: config. outputPath)
187190
@@ -205,7 +208,11 @@ func protocGenGRPCSwiftCommand(
205208 displayName: " Generating gRPC Swift files for \( inputFile. absoluteStringNoScheme) " ,
206209 executable: protocPath,
207210 arguments: arguments,
208- inputFiles: [ inputFile, protocGenGRPCSwiftPath] ,
211+ inputFiles: [
212+ inputFile,
213+ protocGenGRPCSwiftPath,
214+ configFilePath
215+ ] ,
209216 outputFiles: [ outputFilePath]
210217 )
211218}
0 commit comments