diff --git a/Plugins/OpenAPIGeneratorCommand/plugin.swift b/Plugins/OpenAPIGeneratorCommand/plugin.swift index 1a2edef02..fc1c4dea6 100644 --- a/Plugins/OpenAPIGeneratorCommand/plugin.swift +++ b/Plugins/OpenAPIGeneratorCommand/plugin.swift @@ -82,10 +82,11 @@ extension SwiftOpenAPIGeneratorPlugin: CommandPlugin { hadASuccessfulRun = true } catch let error as PluginError { if error.isMisconfigurationError { - print("- OpenAPI code generation failed with error.") + print("- Stopping because target isn't configured for OpenAPI code generation.") throw error } else { - print("- Stopping because target isn't configured for OpenAPI code generation.") + print("- OpenAPI code generation failed with error.") + throw error } } } diff --git a/Sources/swift-openapi-generator/GenerateOptions+runGenerator.swift b/Sources/swift-openapi-generator/GenerateOptions+runGenerator.swift index ab868c056..632dc1e6d 100644 --- a/Sources/swift-openapi-generator/GenerateOptions+runGenerator.swift +++ b/Sources/swift-openapi-generator/GenerateOptions+runGenerator.swift @@ -52,7 +52,7 @@ extension _GenerateOptions { } let (diagnostics, finalizeDiagnostics) = preparedDiagnosticsCollector(outputPath: diagnosticsOutputPath) let doc = self.docPath - print( + FileHandle.standardError.write( """ Swift OpenAPI Generator is running with the following configuration: - OpenAPI document path: \(doc.path)