mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 15:56:05 -07:00
Fixed the null ref exception #1460
This commit is contained in:
parent
5342746d52
commit
016c409ace
1 changed files with 3 additions and 5 deletions
|
@ -233,7 +233,7 @@ namespace Ombi.Schedule.Jobs.Ombi
|
||||||
|
|
||||||
private void RunScript(UpdateSettings settings, string downloadUrl)
|
private void RunScript(UpdateSettings settings, string downloadUrl)
|
||||||
{
|
{
|
||||||
var scriptToRun = settings.ScriptLocation;
|
var scriptToRun = settings?.ScriptLocation ?? string.Empty;
|
||||||
if (scriptToRun.IsNullOrEmpty())
|
if (scriptToRun.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
Logger.LogError("Use Script is enabled but there is no script to run");
|
Logger.LogError("Use Script is enabled but there is no script to run");
|
||||||
|
@ -245,10 +245,8 @@ namespace Ombi.Schedule.Jobs.Ombi
|
||||||
Logger.LogError("Cannot find the file {0}", scriptToRun);
|
Logger.LogError("Cannot find the file {0}", scriptToRun);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var ombiProcess = _processProvider.FindProcessByName(settings.ProcessName).FirstOrDefault();
|
_processProvider.Start(scriptToRun, downloadUrl + " " + GetArgs(settings));
|
||||||
var currentInstallLocation = Assembly.GetEntryAssembly().Location;
|
|
||||||
_processProvider.Start(scriptToRun, downloadUrl + " " + ombiProcess.Id + " " + GetArgs(settings));
|
|
||||||
|
|
||||||
Logger.LogInformation("Script started");
|
Logger.LogInformation("Script started");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue