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 <albertcheng@microsoft.com>
This commit is contained in:
Azure SDK Bot 2021-11-02 23:05:22 -07:00 committed by GitHub
parent 58c1ecfc1d
commit b3bd976866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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