From cbb395e950294f60717cf711c1301775d562db24 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 2 Nov 2021 23:05:32 -0700 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 2053 (#21558) * Changing inline bash for stress test resource deployment * PR-mod * pr-mod * pr-mod * pr-mod Co-authored-by: Albert Cheng --- eng/common/TestResources/New-TestResources.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index 189f5185c71e..93801d6836a4 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -334,7 +334,7 @@ try { $serviceName = if (Split-Path $ServiceDirectory) { Split-Path -Leaf $ServiceDirectory } else { - $ServiceDirectory + $ServiceDirectory.Trim('/') } $ResourceGroupName = if ($ResourceGroupName) { @@ -600,7 +600,7 @@ try { $outputFile = "$($templateFile.originalFilePath).env" $environmentText = $deploymentOutputs | ConvertTo-Json; - $bytes = ([System.Text.Encoding]::UTF8).GetBytes($environmentText) + $bytes = [System.Text.Encoding]::UTF8.GetBytes($environmentText) $protectedBytes = [Security.Cryptography.ProtectedData]::Protect($bytes, $null, [Security.Cryptography.DataProtectionScope]::CurrentUser) Set-Content $outputFile -Value $protectedBytes -AsByteStream -Force