From 5e2c521f3e5213004f626e5fc5beb01ef56b7941 Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Tue, 30 Nov 2021 18:36:45 -0500 Subject: [PATCH] Fix variable name reference in scope --- .../TestResources/SubConfig-Helpers.ps1 | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/common/TestResources/SubConfig-Helpers.ps1 b/eng/common/TestResources/SubConfig-Helpers.ps1 index dfaa17de5158f..df4dc9cd05760 100644 --- a/eng/common/TestResources/SubConfig-Helpers.ps1 +++ b/eng/common/TestResources/SubConfig-Helpers.ps1 @@ -10,7 +10,7 @@ function ShouldMarkValueAsSecret([string]$serviceDirectoryPrefix, [string]$key, "RESOURCE_GROUP", "LOCATION", "ENVIRONMENT", - "AZURE_AUTHORITY_HOST", + "AUTHORITY_HOST", "RESOURCE_MANAGER_URL", "SERVICE_MANAGEMENT_URL", "ENDPOINT_SUFFIX", @@ -79,15 +79,15 @@ function UpdateSubscriptionConfiguration([object]$subscriptionConfigurationBase, } $subscriptionConfigurationBase[$pair.Name][$nestedPair.Name] = $nestedPair.Value } - } else { - if (ShouldMarkValueAsSecret "AZURE_" $nestedPair.Name $nestedPair.Value) { - Write-Host "##vso[task.setvariable variable=_$($pair.Name);issecret=true;]$($pair.Value)" - } - $subscriptionConfigurationBase[$pair.Name] = $pair.Value - } + } else { + if (ShouldMarkValueAsSecret "AZURE_" $pair.Name $pair.Value) { + Write-Host "##vso[task.setvariable variable=_$($pair.Name);issecret=true;]$($pair.Value)" + } + $subscriptionConfigurationBase[$pair.Name] = $pair.Value + } } - $serialized = $subscriptionConfigurationBase | ConvertTo-Json -Compress - Write-Host ($subscriptionConfigurationBase | ConvertTo-Json) - Write-Host "##vso[task.setvariable variable=SubscriptionConfiguration;]$serialized" -} \ No newline at end of file + $serialized = $subscriptionConfigurationBase | ConvertTo-Json -Compress + Write-Host ($subscriptionConfigurationBase | ConvertTo-Json) + Write-Host "##vso[task.setvariable variable=SubscriptionConfiguration;]$serialized" +}