From ea2bff585e10cc142159adda88cddfae113d0fc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4umlisberger?= Date: Mon, 1 Nov 2021 10:00:00 +0100 Subject: [PATCH] trim whitespace --- src/WinSW.Core/Configuration/XmlServiceConfig.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WinSW.Core/Configuration/XmlServiceConfig.cs b/src/WinSW.Core/Configuration/XmlServiceConfig.cs index 47986ad..0b43ce1 100644 --- a/src/WinSW.Core/Configuration/XmlServiceConfig.cs +++ b/src/WinSW.Core/Configuration/XmlServiceConfig.cs @@ -654,8 +654,8 @@ namespace WinSW throw new WinSWException("The environment variables file contains one or more invalid entries. Each variable definition must be on a separate line and in the format \"key=value\"."); } - string key = line.Substring(0, equalsSignIndex); - string value = line.Substring(equalsSignIndex + 1); + string key = line.Substring(0, equalsSignIndex).Trim(); + string value = line.Substring(equalsSignIndex + 1).Trim(); Environment.SetEnvironmentVariable(key, value); }