mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] If output is redirected, don't clear the screen first
This commit is contained in:
@@ -67,7 +67,11 @@ namespace SabreTools
|
|||||||
/// <param name="args">String array representing command line parameters</param>
|
/// <param name="args">String array representing command line parameters</param>
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
Console.Clear();
|
// If output is being redirected, don't allow clear screens
|
||||||
|
if (!Console.IsOutputRedirected)
|
||||||
|
{
|
||||||
|
Console.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
// Credits take precidence over all
|
// Credits take precidence over all
|
||||||
if ((new List<string>(args)).Contains("--credits"))
|
if ((new List<string>(args)).Contains("--credits"))
|
||||||
|
|||||||
@@ -43,7 +43,12 @@ namespace SabreTools
|
|||||||
// Perform initial setup and verification
|
// Perform initial setup and verification
|
||||||
_logger = new Logger(true, "database.log");
|
_logger = new Logger(true, "database.log");
|
||||||
_logger.Start();
|
_logger.Start();
|
||||||
Console.Clear();
|
|
||||||
|
// If output is being redirected, don't allow clear screens
|
||||||
|
if (!Console.IsOutputRedirected)
|
||||||
|
{
|
||||||
|
Console.Clear();
|
||||||
|
}
|
||||||
Setup();
|
Setup();
|
||||||
|
|
||||||
// Credits take precidence over all
|
// Credits take precidence over all
|
||||||
@@ -536,6 +541,9 @@ namespace SabreTools
|
|||||||
InitStats(inputs, single);
|
InitStats(inputs, single);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If nothing is set, show the help
|
||||||
|
Build.Help();
|
||||||
|
|
||||||
_logger.Close();
|
_logger.Close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,8 +25,13 @@ namespace SabreTools
|
|||||||
/// <param name="args">String array representing command line parameters</param>
|
/// <param name="args">String array representing command line parameters</param>
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
// If output is being redirected, don't allow clear screens
|
||||||
|
if (!Console.IsOutputRedirected)
|
||||||
|
{
|
||||||
|
Console.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
// Perform initial setup and verification
|
// Perform initial setup and verification
|
||||||
Console.Clear();
|
|
||||||
logger = new Logger(true, "headerer.log");
|
logger = new Logger(true, "headerer.log");
|
||||||
logger.Start();
|
logger.Start();
|
||||||
DBTools.EnsureDatabase(_dbName, _connectionString);
|
DBTools.EnsureDatabase(_dbName, _connectionString);
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
using SabreTools.Helper;
|
using SabreTools.Helper;
|
||||||
|
|
||||||
@@ -66,7 +64,11 @@ namespace SabreTools
|
|||||||
/// <param name="args">String array representing command line parameters</param>
|
/// <param name="args">String array representing command line parameters</param>
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
Console.Clear();
|
// If output is being redirected, don't allow clear screens
|
||||||
|
if (!Console.IsOutputRedirected)
|
||||||
|
{
|
||||||
|
Console.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
// Credits take precidence over all
|
// Credits take precidence over all
|
||||||
if ((new List<string>(args)).Contains("--credits"))
|
if ((new List<string>(args)).Contains("--credits"))
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
using SabreTools.Helper;
|
using SabreTools.Helper;
|
||||||
|
|
||||||
@@ -40,7 +38,12 @@ namespace SabreTools
|
|||||||
// Perform initial setup and verification
|
// Perform initial setup and verification
|
||||||
Logger logger = new Logger(true, "offlinemerge.log");
|
Logger logger = new Logger(true, "offlinemerge.log");
|
||||||
logger.Start();
|
logger.Start();
|
||||||
Console.Clear();
|
|
||||||
|
// If output is being redirected, don't allow clear screens
|
||||||
|
if (!Console.IsOutputRedirected)
|
||||||
|
{
|
||||||
|
Console.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
// Credits take precidence over all
|
// Credits take precidence over all
|
||||||
if ((new List<string>(args)).Contains("--credits"))
|
if ((new List<string>(args)).Contains("--credits"))
|
||||||
|
|||||||
Reference in New Issue
Block a user