Explorar o código

fixed WindowsDriver to work in linux unit tests

Tigger Kindel %!s(int64=2) %!d(string=hai) anos
pai
achega
9c0bfd1478
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

+ 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;