Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

Commit

Permalink
Fix update message
Browse files Browse the repository at this point in the history
  • Loading branch information
Luzifix committed Oct 1, 2016
1 parent cf7f568 commit e8dc60c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions ADTConvert/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class Program
static void Main(string[] args)
{
bool silentMode = (args.Contains("-s") || args.Contains("--silent"));
bool verbose = (args.Contains("-v") || args.Contains("--verbose"));

if (silentMode)
Console.SetOut(TextWriter.Null);

Expand All @@ -20,23 +22,21 @@ static void Main(string[] args)
Console.WriteLine("E-Mail: [email protected]");
Console.WriteLine("--------------------------------");

if (!args.Contains("-noUpdate") && !args.Contains("--disableUpdateCheck"))
VersionCheck.CheckForUpdate(verbose);

if (args.Length <= 0)
{
ConsoleErrorEnd();
}

string filename = Path.GetFullPath(args[0]);
bool verbose = (args.Contains("-v") || args.Contains("--verbose"));

if (!File.Exists(filename))
{
ConsoleErrorEnd($"File {filename} not found!");
}


if (!args.Contains("-noUpdate") && !args.Contains("--disableUpdateCheck"))
VersionCheck.CheckForUpdate(verbose);

new Main(args[0], verbose);

if(!silentMode)
Expand Down
4 changes: 2 additions & 2 deletions ADTConvert/VersionCheck/VersionCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public static void CheckForUpdate(bool verbose = false)
}

Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(text);
Console.Error.WriteLine(text);
Console.ResetColor();

if (Console.ReadKey().Key == ConsoleKey.K)
if (Console.ReadKey().Key == ConsoleKey.Y)
{
System.Diagnostics.Process.Start(realaseURL);
}
Expand Down

0 comments on commit e8dc60c

Please sign in to comment.