1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

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

View File

@ -127,7 +127,11 @@ public Process Start(string path, string args = null, StringDictionary environme
try
{
_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)
{