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 93f617d commit 5b3f1baCopy full SHA for 5b3f1ba
src/Playwright/Transport/StdIOTransport.cs
@@ -171,9 +171,17 @@ private static void StartProcessWithUTF8IOEncoding(Process process)
171
{
172
if (hasConsole)
173
174
- // Restore the original encodings
175
- Console.InputEncoding = originalInputEncoding;
176
- Console.OutputEncoding = originalOutputEncoding;
+ try
+ {
+ // Restore the original encodings
177
+ Console.InputEncoding = originalInputEncoding;
178
+ Console.OutputEncoding = originalOutputEncoding;
179
+ }
180
+ catch (System.IO.IOException)
181
182
+ // It can fail under some conditions:
183
+ // https://github.com/microsoft/playwright-dotnet/issues/2888
184
185
}
186
187
0 commit comments