From fa141bf86e80761c9368bf8e0e74d28e994d2cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4umlisberger?= Date: Mon, 1 Nov 2021 10:01:27 +0100 Subject: [PATCH] trim whitespace --- src/WinSW.Core/Util/ConfigHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WinSW.Core/Util/ConfigHelper.cs b/src/WinSW.Core/Util/ConfigHelper.cs index 10a71d0..3be36ec 100644 --- a/src/WinSW.Core/Util/ConfigHelper.cs +++ b/src/WinSW.Core/Util/ConfigHelper.cs @@ -64,8 +64,8 @@ namespace WinSW.Util throw new WinSWException("The environment variables file (env-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); }