mirror of
https://github.com/livingcomputermuseum/IFS.git
synced 2026-05-03 14:39:21 +00:00
Don't use console if redirected.
This is a brute-force solution, but the existing console code will hit errors if there is no console.
This commit is contained in:
@@ -19,7 +19,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.IO;
|
using System.Threading;
|
||||||
|
|
||||||
namespace IFS.IfsConsole
|
namespace IFS.IfsConsole
|
||||||
{
|
{
|
||||||
@@ -162,6 +162,13 @@ namespace IFS.IfsConsole
|
|||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
|
if (Console.IsOutputRedirected || Console.IsInputRedirected)
|
||||||
|
{
|
||||||
|
// No console, so just run forever.
|
||||||
|
Thread.Sleep(Timeout.Infinite);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
while (!exit)
|
while (!exit)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user