@@ -129,7 +129,7 @@ struct GRPCProtobufGeneratorCommandPlugin {
129
129
dryRun: commandConfig. dryRun
130
130
)
131
131
132
- if !commandConfig. dryRun {
132
+ if !commandConfig. dryRun, commandConfig . verbose {
133
133
Stderr . print ( " Generated gRPC Swift files for \( inputFiles. joined ( separator: " , " ) ) . " )
134
134
}
135
135
}
@@ -152,7 +152,7 @@ struct GRPCProtobufGeneratorCommandPlugin {
152
152
dryRun: commandConfig. dryRun
153
153
)
154
154
155
- if !commandConfig. dryRun {
155
+ if !commandConfig. dryRun, commandConfig . verbose {
156
156
Stderr . print (
157
157
" Generated protobuf message Swift files for \( inputFiles. joined ( separator: " , " ) ) . "
158
158
)
@@ -212,21 +212,23 @@ func executeProtocInvocation(
212
212
213
213
try printProtocOutput ( outputPipe, verbose: verbose)
214
214
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
229
224
}
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
+ )
230
232
231
233
return
232
234
}
0 commit comments