From b3bd9768664ae97b16d216935d656d657c14caea 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:22 -0700 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 2053 (#3027) * 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 189f5185c..93801d683 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