mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Only accept the PID for now in the updater, ignore everything else
This commit is contained in:
parent
5d5b12d80e
commit
cdb595a3cd
@ -71,30 +71,30 @@ private UpdateStartupContext ParseArgs(string[] args)
|
||||
ProcessId = ParseProcessId(args[0])
|
||||
};
|
||||
|
||||
if (args.Count() == 1)
|
||||
{
|
||||
return startupContext;
|
||||
}
|
||||
|
||||
else if (args.Count() == 3)
|
||||
{
|
||||
startupContext.UpdateLocation = args[1];
|
||||
startupContext.ExecutingApplication = args[2];
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
logger.Debug("Arguments:");
|
||||
|
||||
foreach (var arg in args)
|
||||
{
|
||||
logger.Debug(" {0}", arg);
|
||||
}
|
||||
|
||||
var message = String.Format("Number of arguments are unexpected, expected: 3, found: {0}", args.Count());
|
||||
|
||||
throw new ArgumentOutOfRangeException("args", message);
|
||||
}
|
||||
// if (args.Count() == 1)
|
||||
// {
|
||||
// return startupContext;
|
||||
// }
|
||||
//
|
||||
// else if (args.Count() == 3)
|
||||
// {
|
||||
// startupContext.UpdateLocation = args[1];
|
||||
// startupContext.ExecutingApplication = args[2];
|
||||
// }
|
||||
//
|
||||
// else
|
||||
// {
|
||||
// logger.Debug("Arguments:");
|
||||
//
|
||||
// foreach (var arg in args)
|
||||
// {
|
||||
// logger.Debug(" {0}", arg);
|
||||
// }
|
||||
//
|
||||
// var message = String.Format("Number of arguments are unexpected, expected: 3, found: {0}", args.Count());
|
||||
//
|
||||
// throw new ArgumentOutOfRangeException("args", message);
|
||||
// }
|
||||
|
||||
return startupContext;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user