From bb0f5b667cf50990938ff6ed5d6e8a21d0b528e1 Mon Sep 17 00:00:00 2001 From: BobJWalker Date: Tue, 4 Jan 2022 08:10:01 -0600 Subject: [PATCH] Forgot to trim environments --- .../api-scripts/enforce-base-environments.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octopus-samples-instances/api-scripts/enforce-base-environments.ps1 b/octopus-samples-instances/api-scripts/enforce-base-environments.ps1 index aaa6902..cd62e8d 100644 --- a/octopus-samples-instances/api-scripts/enforce-base-environments.ps1 +++ b/octopus-samples-instances/api-scripts/enforce-base-environments.ps1 @@ -97,7 +97,7 @@ foreach ($space in $spacesList.Items) if ($found -eq $false) { $environmentToAdd = @{ - Name = $environmentToCheck + Name = $environmentToCheck.Trim() } $newEnvironment = Invoke-OctopusApi -OctopusUrl $octopusUrl -endPoint "environments" -spaceId $space.Id -apiKey $OctopusApiKey -item $environmentToAdd -method "POST"