Skip to content

Commit b785cb9

Browse files
committed
Add a condition for ensuring the output file path exists before cleaning it
1 parent 1ec5177 commit b785cb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.OpenApi.Hidi/OpenApiService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ CancellationToken cancellationToken
5656
{
5757
throw new ArgumentNullException(nameof(output));
5858
}
59-
if (cleanoutput)
59+
if (cleanoutput && output.Exists)
6060
{
6161
output.Delete();
6262
}

0 commit comments

Comments
 (0)