Fixed: custom script error when importing some downloads
Co-authored-by: Qstick <376117+Qstick@users.noreply.github.com> Closes #5617
This commit is contained in:
parent
6a49f3989a
commit
8f482c534f
|
@ -127,7 +127,11 @@ namespace NzbDrone.Common.Processes
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_logger.Trace("Setting environment variable '{0}' to '{1}'", environmentVariable.Key, environmentVariable.Value);
|
_logger.Trace("Setting environment variable '{0}' to '{1}'", environmentVariable.Key, environmentVariable.Value);
|
||||||
startInfo.EnvironmentVariables.Add(environmentVariable.Key.ToString(), environmentVariable.Value.ToString());
|
|
||||||
|
var key = environmentVariable.Key.ToString();
|
||||||
|
var value = environmentVariable.Value?.ToString();
|
||||||
|
|
||||||
|
startInfo.EnvironmentVariables[key] = value;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue