Only accept the PID for now in the updater, ignore everything else

This commit is contained in:
Mark McDowall 2014-06-05 15:40:19 -07:00
parent 5d5b12d80e
commit cdb595a3cd
1 changed files with 24 additions and 24 deletions

View File

@ -71,30 +71,30 @@ namespace NzbDrone.Update
ProcessId = ParseProcessId(args[0]) ProcessId = ParseProcessId(args[0])
}; };
if (args.Count() == 1) // if (args.Count() == 1)
{ // {
return startupContext; // return startupContext;
} // }
//
else if (args.Count() == 3) // else if (args.Count() == 3)
{ // {
startupContext.UpdateLocation = args[1]; // startupContext.UpdateLocation = args[1];
startupContext.ExecutingApplication = args[2]; // startupContext.ExecutingApplication = args[2];
} // }
//
else // else
{ // {
logger.Debug("Arguments:"); // logger.Debug("Arguments:");
//
foreach (var arg in args) // foreach (var arg in args)
{ // {
logger.Debug(" {0}", arg); // logger.Debug(" {0}", arg);
} // }
//
var message = String.Format("Number of arguments are unexpected, expected: 3, found: {0}", args.Count()); // var message = String.Format("Number of arguments are unexpected, expected: 3, found: {0}", args.Count());
//
throw new ArgumentOutOfRangeException("args", message); // throw new ArgumentOutOfRangeException("args", message);
} // }
return startupContext; return startupContext;
} }