mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-10-31 17:15:28 +08:00 
			
		
		
		
	Detect non-interactive console via System.Console.IsInputRedirected instead of Environment.UserInteractive
This commit is contained in:
		 Bastian Eicher
					Bastian Eicher
				
			
				
					committed by
					
						 Patrik Svensson
						Patrik Svensson
					
				
			
			
				
	
			
			
			 Patrik Svensson
						Patrik Svensson
					
				
			
						parent
						
							2bd1383cbe
						
					
				
				
					commit
					90c2d988ab
				
			| @@ -40,7 +40,7 @@ public sealed class AnsiConsoleFactory | ||||
|         var interactive = settings.Interactive == InteractionSupport.Yes; | ||||
|         if (settings.Interactive == InteractionSupport.Detect) | ||||
|         { | ||||
|             interactive = Environment.UserInteractive; | ||||
|             interactive = !System.Console.IsInputRedirected; | ||||
|         } | ||||
|  | ||||
|         var profile = new Profile(output, encoding); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user