Handle output to stderr

This commit is contained in:
Bastian Eicher
2021-02-12 10:57:37 +01:00
committed by Patrik Svensson
parent 9312663bde
commit a1050fc676
4 changed files with 21 additions and 4 deletions

View File

@ -15,5 +15,17 @@ namespace Spectre.Console
return false;
}
}
public static bool IsStandardError(this TextWriter writer)
{
try
{
return writer == System.Console.Error;
}
catch
{
return false;
}
}
}
}