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:
Bogdan 2023-05-07 20:23:47 +03:00 committed by GitHub
parent 6a49f3989a
commit 8f482c534f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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)
{ {