@@ -129,7 +129,7 @@ struct GRPCProtobufGeneratorCommandPlugin {
129129 dryRun: commandConfig. dryRun
130130 )
131131
132- if !commandConfig. dryRun {
132+ if !commandConfig. dryRun, commandConfig . verbose {
133133 Stderr . print ( " Generated gRPC Swift files for \( inputFiles. joined ( separator: " , " ) ) . " )
134134 }
135135 }
@@ -152,7 +152,7 @@ struct GRPCProtobufGeneratorCommandPlugin {
152152 dryRun: commandConfig. dryRun
153153 )
154154
155- if !commandConfig. dryRun {
155+ if !commandConfig. dryRun, commandConfig . verbose {
156156 Stderr . print (
157157 " Generated protobuf message Swift files for \( inputFiles. joined ( separator: " , " ) ) . "
158158 )
@@ -212,21 +212,23 @@ func executeProtocInvocation(
212212
213213 try printProtocOutput ( outputPipe, verbose: verbose)
214214
215- guard process. terminationReason == . exit && process. terminationStatus == 0 else {
216- let stdErr : String ?
217- if let errorData = try errorPipe. fileHandleForReading. readToEnd ( ) {
218- stdErr = String ( decoding: errorData, as: UTF8 . self)
219- } else {
220- stdErr = nil
221- }
222- let problem = " \( process. terminationReason) : \( process. terminationStatus) "
223- throw CommandPluginError . generationFailure (
224- errorDescription: problem,
225- executable: executableURL. absoluteStringNoScheme,
226- arguments: arguments,
227- stdErr: stdErr
228- )
215+ if process. terminationReason == . exit && process. terminationStatus == 0 {
216+ return
217+ }
218+
219+ let stdErr : String ?
220+ if let errorData = try errorPipe. fileHandleForReading. readToEnd ( ) {
221+ stdErr = String ( decoding: errorData, as: UTF8 . self)
222+ } else {
223+ stdErr = nil
229224 }
225+ let problem = " \( process. terminationReason) : \( process. terminationStatus) "
226+ throw CommandPluginError . generationFailure (
227+ errorDescription: problem,
228+ executable: executableURL. absoluteStringNoScheme,
229+ arguments: arguments,
230+ stdErr: stdErr
231+ )
230232
231233 return
232234}
0 commit comments