2
0
Эх сурвалжийг харах

fixed WindowsDriver to work in linux unit tests

Tigger Kindel 2 жил өмнө
parent
commit
9c0bfd1478

+ 4 - 1
Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

@@ -795,7 +795,10 @@ internal class WindowsDriver : ConsoleDriver {
 
 	public WindowsDriver ()
 	{
-		WinConsole = new WindowsConsole ();
+		if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
+			WinConsole = new WindowsConsole ();
+			// otherwise we're probably running in unite tests
+		}
 		Clipboard = new WindowsClipboard ();
 
 		_isWindowsTerminal = Environment.GetEnvironmentVariable ("WT_SESSION") != null;