We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00dd9c4 commit 3f3dae0Copy full SHA for 3f3dae0
src/Microsoft.OpenApi.Tool/OpenApiService.cs
@@ -1,4 +1,4 @@
1
-using System;
+using System;
2
using System.IO;
3
using System.Linq;
4
using System.Net;
@@ -63,6 +63,11 @@ public static void ProcessOpenApiDocument(
63
throw new ArgumentException(string.Join(Environment.NewLine, context.Errors.Select(e => e.Message).ToArray()));
64
}
65
66
+ if (output.Exists)
67
+ {
68
+ throw new IOException("The file you're writing to already exists.Please input a new output path.");
69
+ }
70
+
71
using var outputStream = output?.Create();
72
73
var textWriter = outputStream != null ? new StreamWriter(outputStream) : Console.Out;
0 commit comments