Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 6dbfcb9

Browse files
committed
remove any whitespace from env var key
1 parent 5e5ae7a commit 6dbfcb9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ServiceStack.Text/PclExport.Net40.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public override void RegisterLicenseFromConfig()
138138
}
139139

140140
//or SERVICESTACK_LICENSE Environment variable
141-
licenceKeyText = Environment.GetEnvironmentVariable(EnvironmentKey);
141+
licenceKeyText = Environment.GetEnvironmentVariable(EnvironmentKey)?.Trim();
142142
if (!string.IsNullOrEmpty(licenceKeyText))
143143
{
144144
LicenseUtils.RegisterLicense(licenceKeyText);

src/ServiceStack.Text/PclExport.NetStandard.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public override void RegisterLicenseFromConfig()
121121
//Automatically register license key stored in <appSettings/> is done in .NET Core AppHost
122122

123123
//or SERVICESTACK_LICENSE Environment variable
124-
var licenceKeyText = GetEnvironmentVariable(EnvironmentKey);
124+
var licenceKeyText = GetEnvironmentVariable(EnvironmentKey)?.Trim();
125125
if (!string.IsNullOrEmpty(licenceKeyText))
126126
{
127127
LicenseUtils.RegisterLicense(licenceKeyText);

0 commit comments

Comments
 (0)