mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-06 21:21:13 -07:00
Made the pass in the port a bit more robust
This commit is contained in:
parent
78c4ed2c06
commit
c24652a89f
1 changed files with 9 additions and 1 deletions
|
@ -51,7 +51,15 @@ namespace PlexRequests.UI
|
|||
var uri = string.Empty;
|
||||
if (args.Length > 0)
|
||||
{
|
||||
uri = args[0];
|
||||
Log.Info("We are going to use port {0} that was passed in", args[0]);
|
||||
int portResult;
|
||||
if (!int.TryParse(args[0], out portResult))
|
||||
{
|
||||
Console.WriteLine("Incorrect Port format. Press Any Key to shut down.");
|
||||
Console.ReadLine();
|
||||
Environment.Exit(1);
|
||||
}
|
||||
uri = $"http://localhost:{portResult}";
|
||||
}
|
||||
|
||||
Log.Trace("Getting assembly version");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue