mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
fixing update for vnext.
This commit is contained in:
@@ -37,28 +37,10 @@ namespace NzbDrone.Update
|
||||
logger.FatalException("An error has occurred while applying update package.", e);
|
||||
}
|
||||
|
||||
TransferUpdateLogs();
|
||||
}
|
||||
|
||||
private static void TransferUpdateLogs()
|
||||
{
|
||||
try
|
||||
{
|
||||
var environmentProvider = _container.Resolve<IEnvironmentProvider>();
|
||||
var diskProvider = _container.Resolve<IDiskProvider>();
|
||||
logger.Info("Copying log files to application directory.");
|
||||
diskProvider.CopyDirectory(environmentProvider.GetSandboxLogFolder(), environmentProvider.GetUpdateLogFolder());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.FatalException("Can't copy upgrade log files to target folder", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Start(string[] args)
|
||||
{
|
||||
VerfityArguments(args);
|
||||
int processId = ParseProcessId(args);
|
||||
|
||||
var exeFileInfo = new FileInfo(_processProvider.GetProcessById(processId).StartPath);
|
||||
@@ -79,13 +61,5 @@ namespace NzbDrone.Update
|
||||
logger.Debug("NzbDrone processId:{0}", id);
|
||||
return id;
|
||||
}
|
||||
|
||||
private void VerfityArguments(string[] args)
|
||||
{
|
||||
if (args == null || args.Length != 2)
|
||||
throw new ArgumentException("Wrong number of parameters were passed in.");
|
||||
|
||||
logger.Debug("Arguments verified. [{0}] , [{1}]", args[0], args[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user