Skip to content

Commit 80569ea

Browse files
authored
Removed BOM when writing exported schema (#8244)
1 parent 5fa94e0 commit 80569ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/HotChocolate/AspNetCore/src/AspNetCore.CommandLine/Command/ExportCommand.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ private static async Task ExecuteAsync(
4949

5050
if (output is not null)
5151
{
52-
await File.WriteAllTextAsync(output.FullName, sdl, Encoding.UTF8, cancellationToken);
52+
await File.WriteAllTextAsync(
53+
output.FullName,
54+
sdl,
55+
new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true),
56+
cancellationToken);
5357
}
5458
else
5559
{

0 commit comments

Comments
 (0)