@@ -97,7 +97,8 @@ struct GRPCProtobufGenerator {
97
97
baseDirectoryPath: configFilePath. deletingLastPathComponent ( ) ,
98
98
protoDirectoryPaths: protoDirectoryPaths,
99
99
protocPath: protocPath,
100
- protocGenGRPCSwiftPath: protocGenGRPCSwiftPath
100
+ protocGenGRPCSwiftPath: protocGenGRPCSwiftPath,
101
+ configFilePath: configFilePath
101
102
)
102
103
commands. append ( grpcCommand)
103
104
}
@@ -174,14 +175,16 @@ extension [URL: GenerationConfig] {
174
175
/// - protoDirectoryPaths: The paths passed to `protoc` in which to look for imported proto files.
175
176
/// - protocPath: The path to `protoc`
176
177
/// - protocGenGRPCSwiftPath: The path to `protoc-gen-grpc-swift`.
178
+ /// - configFilePath: The path to the config file in use.
177
179
/// - Returns: The command to invoke `protoc` with the `protoc-gen-grpc-swift` plugin.
178
180
func protocGenGRPCSwiftCommand(
179
181
inputFile: URL ,
180
182
config: GenerationConfig ,
181
183
baseDirectoryPath: URL ,
182
184
protoDirectoryPaths: [ String ] ,
183
185
protocPath: URL ,
184
- protocGenGRPCSwiftPath: URL
186
+ protocGenGRPCSwiftPath: URL ,
187
+ configFilePath: URL
185
188
) throws -> PackagePlugin . Command {
186
189
let outputPathURL = URL ( fileURLWithPath: config. outputPath)
187
190
@@ -205,7 +208,11 @@ func protocGenGRPCSwiftCommand(
205
208
displayName: " Generating gRPC Swift files for \( inputFile. absoluteStringNoScheme) " ,
206
209
executable: protocPath,
207
210
arguments: arguments,
208
- inputFiles: [ inputFile, protocGenGRPCSwiftPath] ,
211
+ inputFiles: [
212
+ inputFile,
213
+ protocGenGRPCSwiftPath,
214
+ configFilePath
215
+ ] ,
209
216
outputFiles: [ outputFilePath]
210
217
)
211
218
}
0 commit comments