Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Don't check for updates when running silently
Browse files Browse the repository at this point in the history
  • Loading branch information
mosamadeeb committed May 3, 2021
1 parent b144ce8 commit 7a7ef44
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions RyuModManagerCLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ public static async Task Main(string[] args)
}
}

Task<ConsoleOutput> updateCheck = Task.Run(() => CheckForUpdates());

if (File.Exists(INI))
{
IniData ini = new FileIniDataParser().ReadFile(INI);
Expand All @@ -63,6 +61,20 @@ public static async Task Main(string[] args)
}
}

if (isSilent)
{
// No need to check if console won't be shown anyway
checkForUpdates = false;
}

Task<ConsoleOutput> updateCheck = null;

if (checkForUpdates)
{
// Start checking for updates before the actual generation is done
updateCheck = Task.Run(() => CheckForUpdates());
}

List<string> mods = new List<string>();

if (File.Exists(TXT))
Expand Down Expand Up @@ -106,6 +118,7 @@ public static async Task Main(string[] args)
Console.WriteLine("Unable to check for updates\n");
}
}

if (!isSilent)
{
Console.WriteLine("Program finished. Press any key to exit...");
Expand Down

0 comments on commit 7a7ef44

Please sign in to comment.