From 5e9094b54cdd9aec420c787ec885bf61e900fa89 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 7 May 2023 20:23:47 +0300 Subject: [PATCH] Fixed: custom script error when importing some downloads Co-authored-by: Qstick <376117+Qstick@users.noreply.github.com> (cherry picked from commit 8f482c534f15c14a9b3097313a4f5e9273549d88) --- src/NzbDrone.Common/Processes/ProcessProvider.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/NzbDrone.Common/Processes/ProcessProvider.cs b/src/NzbDrone.Common/Processes/ProcessProvider.cs index 796f4f6e8..40ab011ab 100644 --- a/src/NzbDrone.Common/Processes/ProcessProvider.cs +++ b/src/NzbDrone.Common/Processes/ProcessProvider.cs @@ -131,14 +131,7 @@ namespace NzbDrone.Common.Processes var key = environmentVariable.Key.ToString(); var value = environmentVariable.Value?.ToString(); - if (startInfo.EnvironmentVariables.ContainsKey(key)) - { - startInfo.EnvironmentVariables[key] = value; - } - else - { - startInfo.EnvironmentVariables.Add(key, value); - } + startInfo.EnvironmentVariables[key] = value; } catch (Exception e) {